Currently `info registers' does not output uniformely on all platforms, e.g.: On x86*, the output of `info register pc fp' is: info register pc fp pc: 0x400520 fp: 0x7fffffffc490 On ppc64/s390x, it is: info register pc fp pc 0x10000658 0x10000658 <main+20> fp: 0xfffffffd120 On m68k-linux, it is: info register pc fp pc 0x8000042c 0x8000042c <main+4> fp 0xefae83e4 0xefae83e4 It would be nice to have these commands output the same pattern.
See also <http://sourceware.org/ml/gdb-patches/2012-08/msg00039.html>.
Proposed patch: http://sourceware.org/ml/gdb-patches/2012-08/msg00812.html
CVSROOT: /cvs/src Module name: src Changes by: palves@sourceware.org 2012-08-28 09:05:35 Modified files: gdb : ChangeLog infcmd.c gdb/testsuite : ChangeLog gdb/testsuite/gdb.base: pc-fp.exp Log message: 2012-08-28 Pedro Alves <palves@redhat.com> PR gdb/14428 gdb/ * infcmd.c (default_print_one_register_info): New, factored out from default_print_registers_info. (default_print_registers_info): Use it. Mark value unavailable if necessary. (registers_info): Print user registers with default_print_one_register_info. gdb/testsuite/ * gdb.base/pc-fp.exp: Adjust expected output of 'info registers pc fp'. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14637&r2=1.14638 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/infcmd.c.diff?cvsroot=src&r1=1.311&r2=1.312 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3357&r2=1.3358 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/pc-fp.exp.diff?cvsroot=src&r1=1.21&r2=1.22
Patch checked in.