Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Robert Norton" <rnorton@broadcom.com>
To: gdb@sourceware.org
Subject: Info reg sp
Date: Tue, 22 May 2007 15:24:00 -0000	[thread overview]
Message-ID: <B0D822BFECD50F4991F2516EA50F273C018F9AD9@NT-IRVA-0752.brcm.ad.broadcom.com> (raw)

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


             reply	other threads:[~2007-05-22 15:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 15:24 Robert Norton [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B0D822BFECD50F4991F2516EA50F273C018F9AD9@NT-IRVA-0752.brcm.ad.broadcom.com \
    --to=rnorton@broadcom.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox