aboutsummaryrefslogtreecommitdiff
path: root/gdb/disasm.c
diff options
context:
space:
mode:
authorMarkus Metzger <mmetzger@sourceware.org>2013-03-11 08:53:17 +0000
committerMarkus Metzger <mmetzger@sourceware.org>2013-03-11 08:53:17 +0000
commit946287b73c02d2bd079af1fcf6a3b412365a2851 (patch)
tree52dfcac0b29260e9936b69e30da40f540bd369ef /gdb/disasm.c
parentafedecd388d5a4db011c51c617daa1e7224b79e4 (diff)
downloadfsf-binutils-gdb-946287b73c02d2bd079af1fcf6a3b412365a2851.zip
fsf-binutils-gdb-946287b73c02d2bd079af1fcf6a3b412365a2851.tar.gz
fsf-binutils-gdb-946287b73c02d2bd079af1fcf6a3b412365a2851.tar.bz2
Add a disassembly flag to omit the pc prefix and use it in the "record
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.
Diffstat (limited to 'gdb/disasm.c')
-rw-r--r--gdb/disasm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 9d61379..e643c2d 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -122,7 +122,9 @@ dump_insns (struct gdbarch *gdbarch, struct ui_out *uiout,
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,