[patch,rfc] builtin regs -> user regs
Andrew Cagney
ac131313@redhat.com
Mon Jul 7 14:36:00 GMT 2003
> Hello,
>
> Ref: Three register layers
> http://sources.redhat.com/ml/gdb/2003-06/msg00437.html
>
> This patch replaces the builtin registers with user [visible] per-frame registers.
>
> The builtin registers were global - always present regardless of the architecture. These new user [visible] registers support both global, and per-architecture registers.
>
> As with the above post, these registers live on top of the frame vis:
>
> user
> |
> cooked/frame
> |
> raw
I've checked this in.
Andrew
> and this makes it possible to construct user visible registers using per-frame register values. In the case of the MIPS, the 64 bit $fpr0 would be the concatenation of the two 32 bit registers: $fgr0 and $fgr1.
>
> Please note though that the way registers are read/written needs further refinement (I left it as is for the moment). I suspect, for instance, that currently register writes don't work at all.
>
> I'm also not comfortable with using `builtin' for the registers that apply to all architectures. Perhaphs:
> user_reg_add_all
> user_reg_add_global
> are better. Thougts?
>
> comments?
> Andrew
>
> (no this isn't for the 6.0 branch)
>
>
>
> 2003-06-29 Andrew Cagney <cagney@redhat.com>
>
> * expprint.c: Include "user-regs.h" instead of "frame.h".
> (print_subexp): Use user_reg_map_regnum_to_name, instead of
> frame_map_regnum_to_name.
> * frame.c: Include "user-regs.h" instead of "builtin-regs.h".
> (frame_map_name_to_regnum): Simplify, call
> user_reg_map_name_to_regnum.
> (frame_map_regnum_to_name): Simplify, call
> user_reg_map_regnum_to_name.
> (frame_register_unwind): Update.
> * std-regs.c: Include "user-regs.h" instead of "builtin-regs.h".
> (_initialize_frame_reg): Call user_reg_add_builtin.
> * findvar.c: Include "user-regs.h" instead of "builtin-regs.h".
> (value_of_register): Use value_of_user_reg.
> * eval.c (evaluate_subexp_standard): Update.
> * parse.c (write_dollar_variable): Update.
> * d10v-tdep.c (d10v_print_registers_info): Update.
> * infcmd.c (registers_info): Update.
> * Makefile.in (SFILES): Delete "builtin-regs.c", add "user-regs.c".
> (builtin_regs_h): Delete macro.
> (user_regs_h): Define.
> (COMMON_OBS): Delete "builtin-regs.o", add "user-regs.o".
> (builtin-regs.o): Delete target.
> (user-regs.o): Specify dependencies.
> (expprint.o): Update dependencies.
> (findvar.o): Update dependencies.
> (frame.o): Update dependencies.
> (std-regs.o): Update dependencies.
>
More information about the Gdb-patches
mailing list