2003-07-31 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Thu, 31 Jul 2003 21:42:39 +0000 (21:42 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 31 Jul 2003 21:42:39 +0000 (21:42 +0000)
commit6302298482a57a625399947705ae2b3981b07d20
treecfe90a979a6a9f44e609d19aeab30a442794f43d
parent7cf6e574cf782fea47b526196458ecbfb436aff9
2003-07-31  Andrew Cagney  <cagney@redhat.com>

* user-regs.c (struct user_reg): Add "next" link.
(struct user_regs): Replace "user" with "first" and "last" links.
(append_user_reg): Add pre-allocated "reg" parameter.
(builtin_user_regs): Provide initial value for "last".
(user_reg_add_builtin): XMALLOC memory for append_user_reg.
(user_regs_init): Allocate memory from the gdbarch obstack.
(user_reg_add): GDBARCH_OBSTACK_ZALLOC memory for append_user_reg.
(user_reg_map_name_to_regnum): Rewrite to search the user_reg
linked list.
(usernum_to_user_reg): New function.
(user_reg_map_regnum_to_name): Use usernum_to_user_reg.
(value_of_user_reg): Use usernum_to_user_reg.
(user_regs_free): Delete function.
(_initialize_user_regs): Update register_gdbarch_data call.
gdb/ChangeLog
gdb/user-regs.c