Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] Don't print saved registers with no name
Date: Tue, 23 Sep 2003 20:30:00 -0000	[thread overview]
Message-ID: <20030923203049.GA10153@nevyn.them.org> (raw)
In-Reply-To: <3F6F233A.5020904@redhat.com>

On Mon, Sep 22, 2003 at 12:28:42PM -0400, Andrew Cagney wrote:
> >     for (i = 0; i < numregs; i++)
> >-      if (i != SP_REGNUM)
> >+      if (REGISTER_NAME (i) && REGISTER_NAME (i)[0] && i != SP_REGNUM)
> > 	{
> 
> That should be changed to use a reggroup iterator.

We only seem to have an iterator for iterating over a list of
reggroups, not for finding the members of a reggroup.  I figure this is
what you meant?

[Both patches display sp an extra time.  I don't see a way around it,
with this code the way it is... does anyone else?]

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2003-09-23  Daniel Jacobowitz  <drow@mvista.com>

	* stack.c (frame_info): Only display registers in all_reggroup.

Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.87
diff -u -p -r1.87 stack.c
--- stack.c	21 Sep 2003 01:26:45 -0000	1.87
+++ stack.c	23 Sep 2003 20:25:56 -0000
@@ -1079,7 +1079,8 @@ frame_info (char *addr_exp, int from_tty
     count = 0;
     numregs = NUM_REGS + NUM_PSEUDO_REGS;
     for (i = 0; i < numregs; i++)
-      if (i != SP_REGNUM)
+      if (i != SP_REGNUM
+	  && gdbarch_register_reggroup_p (current_gdbarch, i, all_reggroup))
 	{
 	  /* Find out the location of the saved register without
              fetching the corresponding value.  */


  reply	other threads:[~2003-09-23 20:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-22 16:22 Daniel Jacobowitz
2003-09-22 16:28 ` Andrew Cagney
2003-09-23 20:30   ` Daniel Jacobowitz [this message]
2003-09-23 21:23     ` Andrew Cagney
2003-09-25 16:12       ` Daniel Jacobowitz

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=20030923203049.GA10153@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /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