Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Info reg sp
@ 2007-05-22 15:24 Robert Norton
  2007-05-22 15:34 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Norton @ 2007-05-22 15:24 UTC (permalink / raw)
  To: gdb

Hi,
 
I'm porting GDB 6.6 to our target and one of my users reported a problem
with the command 'info reg sp'. Having done some digging it seems the
following code in infcmd.c is causing me problems:

 int regnum = frame_map_name_to_regnum (deprecated_selected_frame,
            start, end - start);
 if (regnum >= 0)
   {
     gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
       deprecated_selected_frame, regnum, fpregs);
     continue;
   }

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?

Many thanks,

Robert Norton


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-22 16:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-22 15:24 Info reg sp Robert Norton
2007-05-22 15:34 ` Daniel Jacobowitz
2007-05-22 15:58   ` Robert Norton
2007-05-22 16:32     ` Daniel Jacobowitz
2007-05-22 16:47       ` Robert Norton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox