From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19456 invoked by alias); 23 Sep 2003 20:30:51 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19449 invoked from network); 23 Sep 2003 20:30:50 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 23 Sep 2003 20:30:50 -0000 Received: from drow by nevyn.them.org with local (Exim 4.22 #1 (Debian)) id 1A1to9-0002gD-M6; Tue, 23 Sep 2003 16:30:49 -0400 Date: Tue, 23 Sep 2003 20:30:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [patch] Don't print saved registers with no name Message-ID: <20030923203049.GA10153@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <20030922162202.GA4953@nevyn.them.org> <3F6F233A.5020904@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F6F233A.5020904@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-09/txt/msg00507.txt.bz2 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 * 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. */