aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-06-22 16:53:27 +0100
committerNick Clifton <nickc@redhat.com>2015-06-22 16:53:27 +0100
commitbdc4de1b24353c4213e404029252ec75065499de (patch)
treec3ad4f2c6df81c81c6caae1251ecfd91fbcaee3e /include
parent07fcd30112bb071e8dda0a2229a860f2874a7816 (diff)
downloadgdb-bdc4de1b24353c4213e404029252ec75065499de.zip
gdb-bdc4de1b24353c4213e404029252ec75065499de.tar.gz
gdb-bdc4de1b24353c4213e404029252ec75065499de.tar.bz2
Stop "objdump -d" from disassembling past a symbolic address.
include * dis-asm.h (struct disassemble_info): Add stop_vma field. binuti * objdump.c (disassemble_bytes): Set the stop_vma field in the disassemble_info structure when disassembling code sections with -d. * doc/binutils.texi (objdump): Document the discrepancy between -d and -D. opcodes * dis-buf.c (buffer_read_memory): Fail is stop_vma is set and the requested region lies beyond it. * bfin-dis.c (print_insn_bfin): Ignore sysop instructions when looking for 32-bit insns. * mcore-dis.c (print_insn_mcore): Disable stop_vma when reading data. * sh-dis.c (print_insn_sh): Likewise. * tic6x-dis.c (print_insn_tic6x): Disable stop_vma when reading blocks of instructions. * vax-dis.c (print_insn_vax): Check that the requested address does not clash with the stop_vma. tests * gas/arm/backslash-at.s: Add extra .byte directives so that the foo symbol does not appear to point half way through an instruction. * gas/arm/backslash-at.d: Update expected disassembly. * gas/i386/ilp32/x86-64-opcode-inval-intel.d: Likewise. * gas/i386/ilp32/x86-64-opcode-inval.d: Likewise. * gas/i386/x86-64-opcode-inval-intel.d: Likewise. * gas/i386/x86-64-opcode-inval.d: Likewise.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/dis-asm.h8
2 files changed, 12 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 9f8e212..c924c56 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-22 Nick Clifton <nickc@redhat.com>
+
+ * dis-asm.h (struct disassemble_info): Add stop_vma field.
+
2015-05-28 Catherine Moore <clm@codesourcery.com>
include/
diff --git a/include/dis-asm.h b/include/dis-asm.h
index ad060ee..ebc2604 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -212,6 +212,14 @@ typedef struct disassemble_info
/* Command line options specific to the target disassembler. */
char * disassembler_options;
+ /* If non-zero then try not disassemble beyond this address, even if
+ there are values left in the buffer. This address is the address
+ of the nearest symbol forwards from the start of the disassembly,
+ and it is assumed that it lies on the boundary between instructions.
+ If an instruction spans this address then this is an error in the
+ file being disassembled. */
+ bfd_vma stop_vma;
+
} disassemble_info;