diff options
author | Joern Rennecke <joern.rennecke@embecosm.com> | 2009-09-11 04:45:57 +0000 |
---|---|---|
committer | Joern Rennecke <joern.rennecke@embecosm.com> | 2009-09-11 04:45:57 +0000 |
commit | 779734bae5a1be2e9b48a9807149df5e38335285 (patch) | |
tree | 19fc4fed5b9de6934f8f7839d0129bef65cf7192 /gdb/infcmd.c | |
parent | 4195238713fd818958a9e41fee154ea357304b59 (diff) | |
download | binutils-arc-insight_6_8-branch.zip binutils-arc-insight_6_8-branch.tar.gz binutils-arc-insight_6_8-branch.tar.bz2 |
gdb/insight for ARCompact (from Richard Stuckey)arc-insight_6_8-branch
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 972f9e2..4e76260 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1603,15 +1603,25 @@ default_print_registers_info (struct gdbarch *gdbarch, continue; } - /* If the register name is empty, it is undefined for this - processor, so don't display anything. */ - if (gdbarch_register_name (gdbarch, i) == NULL - || *(gdbarch_register_name (gdbarch, i)) == '\0') - continue; - - fputs_filtered (gdbarch_register_name (gdbarch, i), file); - print_spaces_filtered (15 - strlen (gdbarch_register_name - (gdbarch, i)), file); + { + /* richards ARC 29/10/27 gdb bug: 9884 + call the gdbarch_register_name once only! + */ + const char* name = gdbarch_register_name (gdbarch, i); + + /* If the register name is empty, it is undefined for this + processor, so don't display anything. */ + if (name == NULL || *name == '\0') + continue; + + fputs_filtered (name, file); + + /* richards ARC 29/9/08 gdb bug: 9885 + Some ARC register names are longer than 15 chars! + There should be a gdbarch_max_register_name_length function + which could be called here instead of using an integer literal. */ + print_spaces_filtered (22 - strlen (name), file); + } /* Get the data in raw format. */ if (! frame_register_read (frame, i, buffer)) |