[rfc 6/8] record disas: omit function names by default
markus.t.metzger@intel.com
markus.t.metzger@intel.com
Thu Feb 14 16:30:00 GMT 2013
From: Markus Metzger <markus.t.metzger@intel.com>
Omit function names in the disassembly of the "record disassemble" command
unless the "/f" modifier is specified.
This helps align the disassembly output across functions. The branch
destination is already obvious from the instruction order.
2013-02-14 Markus Metzger <markus.t.metzger@intel.com>
* record.c (get_disas_modifiers): Set DISASSEMBLY_OMIT_FNAME
unless /f is given.
(_initialize_record): Update the "record disassemble" help text.
---
gdb/record.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/gdb/record.c b/gdb/record.c
index 4f848ce..3ac4765 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -328,8 +328,13 @@ get_disas_modifiers (char **arg)
modifiers = 0;
args = *arg;
+ /* By default, we omit the function name to keep the disassembly better
+ aligned. The branch destination is obvious from the instruction order
+ in the disassembly. */
+ modifiers |= DISASSEMBLY_OMIT_FNAME;
+
if (args == NULL)
- return 0;
+ return modifiers;
while (*args == '/')
{
@@ -355,6 +360,9 @@ get_disas_modifiers (char **arg)
case 'r':
modifiers |= DISASSEMBLY_RAW_INSN;
break;
+ case 'f':
+ modifiers &= ~DISASSEMBLY_OMIT_FNAME;
+ break;
default:
error (_("Invalid modifier: %c."), *args);
}
@@ -485,6 +493,7 @@ Argument is instruction number, as shown by 'info record'."),
Disassemble a section of the execution log.\n\
With a /m modifier, source lines are included (if available).\n\
With a /r modifier, raw instructions in hex are included.\n\
+With a /f modifier, function names are included.\n\
With no argument, disassembles ten more instructions after or around the \
previous disassembly.\n\
\"disassemble -\" disassembles ten instructions before a previous ten-line \
--
1.7.1
More information about the Gdb-patches
mailing list