This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Info reg sp


On Tue, May 22, 2007 at 08:24:34AM -0700, Robert Norton wrote:
> The problem is that frame_map_name_to_regnum returns a value greater
> than NUM_REGS+NUM_PSEUDO_REGS because there is a builtin user reg by
> that name which is returned by user_reg_map_name_to_regnum. The question
> is: should my print_registers_info be able to handle this (if so how? I
> suppose by calling value_of_user_reg) or is this code broken?

Hmm, good question.  I could make an argument either way.  Every port
has this same problem, but then again only the default
print_registers_info and those with their own print_registers_info
would have to be fixed.

Still, it's nasty that value_of_register can handle user registers but
nothing else can.  Maybe frame.c should also?

I've been starting to use user registers more heavily lately, since
pseudo registers have strange problems - they only come from a
regcache, not from a frame.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]