[patch] Don't print saved registers with no name
Daniel Jacobowitz
drow@mvista.com
Thu Sep 25 16:12:00 GMT 2003
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 <drow@mvista.com>
* 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 <drow@mvista.com>
+
+ * stack.c: Include "reggroups.h".
+ (frame_info): Only display registers in all_reggroup.
+ * Makefile.in (stack.o): Update dependencies.
+
2003-09-25 Jerome Guitton <guitton@act-europe.fr>
* 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. */
More information about the Gdb-patches
mailing list