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]

Info reg sp


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


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