This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch] Don't print saved registers with no name
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 23 Sep 2003 16:30:49 -0400
- Subject: Re: [patch] Don't print saved registers with no name
- References: <20030922162202.GA4953@nevyn.them.org> <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. */