* parse.c (target_map_name_to_register): Check target specific
authorRon Unrau <runrau@cygnus>
Wed, 17 Jun 1998 21:53:20 +0000 (21:53 +0000)
committerRon Unrau <runrau@cygnus>
Wed, 17 Jun 1998 21:53:20 +0000 (21:53 +0000)
          aliases *first* so that it can over-ride architectural names
* txvu-tdep.c: start to handle backtraces

gdb/parse.c

index f7f5d1d71b7d3dc6d564ec46448d1cb30d21bf4d..edb374cea96f659ba9aa4989f46a13f94c057edd 100644 (file)
@@ -112,7 +112,16 @@ target_map_name_to_register (str, len)
 {
   int i;
 
-  /* First search architectural register name space. */
+  /* First try target specific aliases. We try these first because on some 
+     systems standard names can be context dependent (eg. $pc on a 
+     multiprocessor can be could be any of several PCs).  */
+#ifdef REGISTER_NAME_ALIAS_HOOK
+  i =  REGISTER_NAME_ALIAS_HOOK (str, len);
+  if (i >= 0)
+    return i;
+#endif
+
+  /* Search architectural register name space. */
   for (i = 0; i < NUM_REGS; i++)
     if (reg_names[i] && len == strlen (reg_names[i])
        && STREQN (str, reg_names[i], len))
@@ -128,11 +137,6 @@ target_map_name_to_register (str, len)
        return std_regs[i].regnum;
       }
 
-  /* Try target specific aliases */
-#ifdef REGISTER_NAME_ALIAS_HOOK
-  return REGISTER_NAME_ALIAS_HOOK (str, len);
-#endif
-
   return -1;
 }
 
This page took 0.026016 seconds and 4 git commands to generate.