Daniel Jacobowitz wrote: > On Fri, Mar 06, 2009 at 12:00:31AM -0500, Aleksandar Ristovski wrote: >> Maybe adding gdbarch_regname_to_regnum or something like that (which would >> avoid iterating through the registers and comparing returned register >> names). > > Let's keep optimization separate from functionality; there's a > function in user-regs.h to do the lookup and if it's too slow it can > be converted to use a hash table. > I didn't really think about optimization, but I did not understand what/how user-regs is being used. Now I realize that is the mechanism for adding register aliases. Here is another try. (again, tested on in-house gdb variant). ChangeLog: * mips-tdep.c (mips_numeric_register_alieses): New definition. (mips_gdbarch_init): Add user registers from mips_numeric_register_aliases.