aboutsummaryrefslogtreecommitdiff
path: root/gas
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 /gas
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 'gas')
-rw-r--r--gas/testsuite/ChangeLog11
-rw-r--r--gas/testsuite/gas/arm/backslash-at.d18
-rw-r--r--gas/testsuite/gas/arm/backslash-at.s7
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval-intel.d12
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval.d12
-rw-r--r--gas/testsuite/gas/i386/x86-64-opcode-inval-intel.d12
-rw-r--r--gas/testsuite/gas/i386/x86-64-opcode-inval.d12
7 files changed, 48 insertions, 36 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 511dce3..2243489 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2015-06-22 Nick Clifton <nickc@redhat.com>
+
+ * 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.
+
2015-06-19 Peter Bergner <bergner@vnet.ibm.com>
* gas/ppc/power8.d: Fixup rfebb test results.
diff --git a/gas/testsuite/gas/arm/backslash-at.d b/gas/testsuite/gas/arm/backslash-at.d
index 3397573..49e815a 100644
--- a/gas/testsuite/gas/arm/backslash-at.d
+++ b/gas/testsuite/gas/arm/backslash-at.d
@@ -5,13 +5,13 @@
Disassembly of section .text:
0+000 <.*>.*(615c|5c61).*
-0+002 <foo> e3a00000 mov r0, #0
-0+006 <foo\+0x4> e3a00000 mov r0, #0
-0+00a <foo\+0x8> e3a00000 mov r0, #0
-0+00e <foo\+0xc> e3a00001 mov r0, #1
-0+012 <foo\+0x10> e3a00001 mov r0, #1
-0+016 <foo\+0x14> e3a00001 mov r0, #1
-0+01a <foo\+0x18> e3a00002 mov r0, #2
-0+01e <foo\+0x1c> e3a00002 mov r0, #2
-0+022 <foo\+0x20> e3a00002 mov r0, #2
+0+004 <foo> e3a00000 mov r0, #0
+0+008 <foo\+0x4> e3a00000 mov r0, #0
+0+00c <foo\+0x8> e3a00000 mov r0, #0
+0+010 <foo\+0xc> e3a00001 mov r0, #1
+0+014 <foo\+0x10> e3a00001 mov r0, #1
+0+018 <foo\+0x14> e3a00001 mov r0, #1
+0+01c <foo\+0x18> e3a00002 mov r0, #2
+0+020 <foo\+0x1c> e3a00002 mov r0, #2
+0+024 <foo\+0x20> e3a00002 mov r0, #2
#...
diff --git a/gas/testsuite/gas/arm/backslash-at.s b/gas/testsuite/gas/arm/backslash-at.s
index 4975aea..1357354 100644
--- a/gas/testsuite/gas/arm/backslash-at.s
+++ b/gas/testsuite/gas/arm/backslash-at.s
@@ -6,9 +6,10 @@
mov r0, #\@ @comment
.endm
-.byte '\\
-.byte '\a
-
+ .byte '\\
+ .byte '\a
+ .byte 0
+ .byte 0
foo:
bar
bar
diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval-intel.d b/gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval-intel.d
index cd503eb..cefd9fd 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval-intel.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval-intel.d
@@ -12,26 +12,26 @@ Disassembly of section .text:
0+1 <aad0>:
[ ]*[a-f0-9]+: d5 \(bad\)
-[ ]*[a-f0-9]+: 0a d5 or dl,ch
+[ ]*[a-f0-9]+: 0a .byte 0xa
0+3 <aad1>:
[ ]*[a-f0-9]+: d5 \(bad\)
-[ ]*[a-f0-9]+: 02 d4 add dl,ah
+[ ]*[a-f0-9]+: 02 .byte 0x2
0+5 <aam0>:
[ ]*[a-f0-9]+: d4 \(bad\)
-[ ]*[a-f0-9]+: 0a d4 or dl,ah
+[ ]*[a-f0-9]+: 0a .byte 0xa
0+7 <aam1>:
[ ]*[a-f0-9]+: d4 \(bad\)
-[ ]*[a-f0-9]+: 02 3f add bh,BYTE PTR \[rdi\]
+[ ]*[a-f0-9]+: 02 .byte 0x2
0+9 <aas>:
[ ]*[a-f0-9]+: 3f \(bad\)
0+a <bound>:
-[ ]*[a-f0-9]+: 62 \(bad\)
-[ ]*[a-f0-9]+: 10 27 adc BYTE PTR \[rdi\],ah
+[ ]*[a-f0-9]+: 62 .byte 0x62
+[ ]*[a-f0-9]+: 10 .byte 0x10
0+c <daa>:
[ ]*[a-f0-9]+: 27 \(bad\)
diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval.d b/gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval.d
index 35f8137..21ac5de 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval.d
@@ -12,26 +12,26 @@ Disassembly of section .text:
0+1 <aad0>:
[ ]*[a-f0-9]+: d5 \(bad\)
-[ ]*[a-f0-9]+: 0a d5 or %ch,%dl
+[ ]*[a-f0-9]+: 0a .byte 0xa
0+3 <aad1>:
[ ]*[a-f0-9]+: d5 \(bad\)
-[ ]*[a-f0-9]+: 02 d4 add %ah,%dl
+[ ]*[a-f0-9]+: 02 .byte 0x2
0+5 <aam0>:
[ ]*[a-f0-9]+: d4 \(bad\)
-[ ]*[a-f0-9]+: 0a d4 or %ah,%dl
+[ ]*[a-f0-9]+: 0a .byte 0xa
0+7 <aam1>:
[ ]*[a-f0-9]+: d4 \(bad\)
-[ ]*[a-f0-9]+: 02 3f add \(%rdi\),%bh
+[ ]*[a-f0-9]+: 02 .byte 0x2
0+9 <aas>:
[ ]*[a-f0-9]+: 3f \(bad\)
0+a <bound>:
-[ ]*[a-f0-9]+: 62 \(bad\)
-[ ]*[a-f0-9]+: 10 27 adc %ah,\(%rdi\)
+[ ]*[a-f0-9]+: 62 .byte 0x62
+[ ]*[a-f0-9]+: 10 .byte 0x10
0+c <daa>:
[ ]*[a-f0-9]+: 27 \(bad\)
diff --git a/gas/testsuite/gas/i386/x86-64-opcode-inval-intel.d b/gas/testsuite/gas/i386/x86-64-opcode-inval-intel.d
index 7cf0c27..df7c8bd 100644
--- a/gas/testsuite/gas/i386/x86-64-opcode-inval-intel.d
+++ b/gas/testsuite/gas/i386/x86-64-opcode-inval-intel.d
@@ -12,26 +12,26 @@ Disassembly of section .text:
0+1 <aad0>:
[ ]*[a-f0-9]+: d5 \(bad\)
-[ ]*[a-f0-9]+: 0a d5 or dl,ch
+[ ]*[a-f0-9]+: 0a .byte 0xa
0+3 <aad1>:
[ ]*[a-f0-9]+: d5 \(bad\)
-[ ]*[a-f0-9]+: 02 d4 add dl,ah
+[ ]*[a-f0-9]+: 02 .byte 0x2
0+5 <aam0>:
[ ]*[a-f0-9]+: d4 \(bad\)
-[ ]*[a-f0-9]+: 0a d4 or dl,ah
+[ ]*[a-f0-9]+: 0a .byte 0xa
0+7 <aam1>:
[ ]*[a-f0-9]+: d4 \(bad\)
-[ ]*[a-f0-9]+: 02 3f add bh,BYTE PTR \[rdi\]
+[ ]*[a-f0-9]+: 02 .byte 0x2
0+9 <aas>:
[ ]*[a-f0-9]+: 3f \(bad\)
0+a <bound>:
-[ ]*[a-f0-9]+: 62 \(bad\)
-[ ]*[a-f0-9]+: 10 27 adc BYTE PTR \[rdi\],ah
+[ ]*[a-f0-9]+: 62 .byte 0x62
+[ ]*[a-f0-9]+: 10 .byte 0x10
0+c <daa>:
[ ]*[a-f0-9]+: 27 \(bad\)
diff --git a/gas/testsuite/gas/i386/x86-64-opcode-inval.d b/gas/testsuite/gas/i386/x86-64-opcode-inval.d
index ccb19ac..d0d08cb 100644
--- a/gas/testsuite/gas/i386/x86-64-opcode-inval.d
+++ b/gas/testsuite/gas/i386/x86-64-opcode-inval.d
@@ -11,26 +11,26 @@ Disassembly of section .text:
0+1 <aad0>:
[ ]*[a-f0-9]+: d5 \(bad\)
-[ ]*[a-f0-9]+: 0a d5 or %ch,%dl
+[ ]*[a-f0-9]+: 0a .byte 0xa
0+3 <aad1>:
[ ]*[a-f0-9]+: d5 \(bad\)
-[ ]*[a-f0-9]+: 02 d4 add %ah,%dl
+[ ]*[a-f0-9]+: 02 .byte 0x2
0+5 <aam0>:
[ ]*[a-f0-9]+: d4 \(bad\)
-[ ]*[a-f0-9]+: 0a d4 or %ah,%dl
+[ ]*[a-f0-9]+: 0a .byte 0xa
0+7 <aam1>:
[ ]*[a-f0-9]+: d4 \(bad\)
-[ ]*[a-f0-9]+: 02 3f add \(%rdi\),%bh
+[ ]*[a-f0-9]+: 02 .byte 0x2
0+9 <aas>:
[ ]*[a-f0-9]+: 3f \(bad\)
0+a <bound>:
-[ ]*[a-f0-9]+: 62 \(bad\)
-[ ]*[a-f0-9]+: 10 27 adc %ah,\(%rdi\)
+[ ]*[a-f0-9]+: 62 .byte 0x62
+[ ]*[a-f0-9]+: 10 .byte 0x10
0+c <daa>:
[ ]*[a-f0-9]+: 27 \(bad\)