aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-02-15 19:13:14 +0000
committerTom Tromey <tromey@redhat.com>2012-02-15 19:13:14 +0000
commit3af2590d3ee379d7e7ad4a1019887d3983721227 (patch)
tree5e9684584ba0662f16f282dac439204379cbd5e3 /gdb/infcmd.c
parent29988831db7f6823f7515219492e50e86c196e84 (diff)
downloadgdb-3af2590d3ee379d7e7ad4a1019887d3983721227.zip
gdb-3af2590d3ee379d7e7ad4a1019887d3983721227.tar.gz
gdb-3af2590d3ee379d7e7ad4a1019887d3983721227.tar.bz2
PR gdb/12659:
* infcmd.c (registers_info): Print just the current register's name. gdb/testsuite * gdb.base/pc-fp.exp: Add "info register" tests.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index e9e3e32..7d929df 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2170,7 +2170,7 @@ registers_info (char *addr_exp, int fpregs)
struct value_print_options opts;
struct value *val = value_of_user_reg (regnum, frame);
- printf_filtered ("%s: ", start);
+ printf_filtered ("%.*s: ", (int) (end - start), start);
get_formatted_print_options (&opts, 'x');
val_print_scalar_formatted (check_typedef (value_type (val)),
value_contents_for_printing (val),