From: Ron Unrau Date: Wed, 17 Jun 1998 21:53:20 +0000 (+0000) Subject: * parse.c (target_map_name_to_register): Check target specific X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3b3835ccde15cf144e5a268ca8392904a637a572;p=binutils-gdb.git * parse.c (target_map_name_to_register): Check target specific aliases *first* so that it can over-ride architectural names * txvu-tdep.c: start to handle backtraces --- diff --git a/gdb/parse.c b/gdb/parse.c index f7f5d1d71b7..edb374cea96 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -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; }