From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13437 invoked by alias); 25 Sep 2003 16:12: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 13365 invoked from network); 25 Sep 2003 16:12:49 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 25 Sep 2003 16:12:49 -0000 Received: from drow by nevyn.them.org with local (Exim 4.22 #1 (Debian)) id 1A2YjX-0005Yj-0B for ; Thu, 25 Sep 2003 12:12:47 -0400 Date: Thu, 25 Sep 2003 16:12:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [patch] Don't print saved registers with no name Message-ID: <20030925161246.GA12478@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20030922162202.GA4953@nevyn.them.org> <3F6F233A.5020904@redhat.com> <20030923203049.GA10153@nevyn.them.org> <3F70B9E6.5000106@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F70B9E6.5000106@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-09/txt/msg00564.txt.bz2 On Tue, Sep 23, 2003 at 05:23:50PM -0400, Andrew Cagney wrote: > >- if (i != SP_REGNUM) > >+ if (i != SP_REGNUM > >+ && gdbarch_register_reggroup_p (current_gdbarch, i, all_reggroup)) > > Yep, thanks. > > >[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?] > > Don't be too worried about the duplication - SP_REGNUM is going away > anyway. However, bug report it so hopefully I can discover that > eliminating SP eliminated the problem :-) Thanks, done and done. The astute reader will note that the above does not compile. Checked in this instead. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2003-09-25 Daniel Jacobowitz * stack.c: Include "reggroups.h". (frame_info): Only display registers in all_reggroup. * Makefile.in (stack.o): Update dependencies. Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.4799 diff -u -p -r1.4799 ChangeLog --- ChangeLog 25 Sep 2003 14:20:58 -0000 1.4799 +++ ChangeLog 25 Sep 2003 16:11:23 -0000 @@ -1,3 +1,9 @@ +2003-09-25 Daniel Jacobowitz + + * stack.c: Include "reggroups.h". + (frame_info): Only display registers in all_reggroup. + * Makefile.in (stack.o): Update dependencies. + 2003-09-25 Jerome Guitton * arm-tdep.c (arm_skip_prologue): Handle "sub ip, sp #n" and Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.447 diff -u -p -r1.447 Makefile.in --- Makefile.in 25 Sep 2003 09:10:29 -0000 1.447 +++ Makefile.in 25 Sep 2003 16:11:24 -0000 @@ -2342,7 +2342,7 @@ stack.o: stack.c $(defs_h) $(gdb_string_ $(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \ $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \ $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) \ - $(gdb_assert_h) $(dictionary_h) + $(gdb_assert_h) $(dictionary_h) $(reggroups_h) standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \ $(inferior_h) $(gdb_wait_h) std-regs.o: std-regs.c $(defs_h) $(user_regs_h) $(frame_h) $(gdbtypes_h) \ 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 25 Sep 2003 16:11:27 -0000 @@ -43,6 +43,7 @@ #include "stack.h" #include "gdb_assert.h" #include "dictionary.h" +#include "reggroups.h" /* Prototypes for exported functions. */ @@ -1079,7 +1080,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. */