instruction-history" command of record-btrace.
The pc prefix would appear multiple times in the branch trace disassembly,
which is more confusing than helpful.
gdb/
* record-btrace.c (btrace_insn_history): Omit the pc prefix in
the instruction history disassembly.
* disasm.c (dump_insns): Omit the pc prefix, if requested.
* disasm.h (DISASSEMBLY_OMIT_PC): New.
2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
+ * record-btrace.c (btrace_insn_history): Omit the pc prefix in
+ the instruction history disassembly.
+ * disasm.c (dump_insns): Omit the pc prefix, if requested.
+ * disasm.h (DISASSEMBLY_OMIT_PC): New.
+
+2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
+
* Makefile.in (SFILES): Add record-btrace.c
(COMMON_OBS): Add record-btrace.o
* record-btrace.c: New.
num_displayed++;
}
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- ui_out_text (uiout, pc_prefix (pc));
+
+ if ((flags & DISASSEMBLY_OMIT_PC) == 0)
+ ui_out_text (uiout, pc_prefix (pc));
ui_out_field_core_addr (uiout, "address", gdbarch, pc);
if (!build_address_symbolic (gdbarch, pc, 0, &name, &offset, &filename,
#define DISASSEMBLY_RAW_INSN (0x1 << 1)
#define DISASSEMBLY_OMIT_FNAME (0x1 << 2)
#define DISASSEMBLY_FILENAME (0x1 << 3)
+#define DISASSEMBLY_OMIT_PC (0x1 << 4)
struct ui_out;
struct ui_file;
case 'f':
modifiers |= DISASSEMBLY_OMIT_FNAME;
break;
+ case 'p':
+ modifiers |= DISASSEMBLY_OMIT_PC;
+ break;
default:
error (_("Invalid modifier: %c."), *args);
}
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 omitted.\n\
+With a /p modifier, current position markers are omitted.\n\
With no argument, disassembles ten more instructions after the previous \
disassembly.\n\
\"record instruction-history -\" disassembles ten instructions before a \