diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-11-29 13:55:17 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-11-29 13:55:17 +0000 |
commit | eb2f586a0a432ca12038e73f43c662423f9f34c4 (patch) | |
tree | 6c04fdf170dd3573fa7a517b17398ec5e64db926 /gdb | |
parent | 4d92193af9a335ec32387155cc8d02f282345b8f (diff) | |
download | gdb-eb2f586a0a432ca12038e73f43c662423f9f34c4.tar.gz |
* gdb.asm/asm-source.exp: Initialize asm-note to "empty". Set
asm-note to "netbsd" for *-*-netbsdelf* and x86_64-*-netbsd*. Use
it to create the appropriate note.inc.
* gdb.asm/asmsrc1.s: Include "note.inc".
* gdb.asm/netbsd.inc: New file.
* gdb.asm/empty.inc: New file.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.asm/asm-source.exp | 10 | ||||
-rw-r--r-- | gdb/testsuite/gdb.asm/asmsrc1.s | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.asm/empty.inc | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.asm/netbsd.inc | 12 |
5 files changed, 34 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 03391320bef..5751971f8b0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2003-11-29 Mark Kettenis <kettenis@gnu.org> + + * gdb.asm/asm-source.exp: Initialize asm-note to "empty". Set + asm-note to "netbsd" for *-*-netbsdelf* and x86_64-*-netbsd*. Use + it to create the appropriate note.inc. + * gdb.asm/asmsrc1.s: Include "note.inc". + * gdb.asm/netbsd.inc: New file. + * gdb.asm/empty.inc: New file. + 2003-11-28 Michael Chastain <mec.gnu@mindspring.com> Partial fix for PR testsuite/1456. diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp index d07fc7df195..648c77abfcb 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -32,6 +32,7 @@ set prms_id 0 set bug_id 0 set asm-arch "" +set asm-note "empty" set asm-flags "" set link-flags "--entry _start" @@ -124,6 +125,12 @@ if {[istarget "*-*-freebsd*"] || [istarget "*-*-netbsd*"]} then { append link-flags " -static" } +# On NetBSD/ELF we need a special NetBSD-identifying note section. +if { [istarget "*-*-netbsdelf*"] + || [istarget "x86_64-*-netbsd*"] } then { + set asm-note "netbsd" +} + # Watch out, we are invoking the assembler, but the testsuite sets multilib # switches according to compiler syntax. If we pass these options straight # to the assembler, they won't always make sense. If we don't pass them to @@ -146,6 +153,8 @@ set srcfile2 asmsrc2.s remote_exec build "rm -f ${subdir}/arch.inc" remote_download host ${srcdir}/${subdir}/${asm-arch}.inc ${subdir}/arch.inc +remote_exec build "rm -f ${subdir}/note.inc" +remote_download host ${srcdir}/${subdir}/${asm-note}.inc ${subdir}/note.inc if { "${asm-flags}" == "" } { #set asm-flags "-Wa,-gstabs,-I${srcdir}/${subdir},-I${objdir}/${subdir}" @@ -359,3 +368,4 @@ gdb_test "disassem foostatic" ".*<foostatic\\+0>:.*End of assembler dump." \ "look at static function" remote_exec build "rm -f ${subdir}/arch.inc" +remote_exec build "rm -f ${subdir}/note.inc" diff --git a/gdb/testsuite/gdb.asm/asmsrc1.s b/gdb/testsuite/gdb.asm/asmsrc1.s index cba0e90ec2a..48bfb86d419 100644 --- a/gdb/testsuite/gdb.asm/asmsrc1.s +++ b/gdb/testsuite/gdb.asm/asmsrc1.s @@ -65,3 +65,5 @@ gdbasm_datavar globalvar 11 comment "A static variable" gdbasm_datavar staticvar 5 + + .include "note.inc" diff --git a/gdb/testsuite/gdb.asm/empty.inc b/gdb/testsuite/gdb.asm/empty.inc new file mode 100644 index 00000000000..e786488d9f2 --- /dev/null +++ b/gdb/testsuite/gdb.asm/empty.inc @@ -0,0 +1 @@ + comment "empty" diff --git a/gdb/testsuite/gdb.asm/netbsd.inc b/gdb/testsuite/gdb.asm/netbsd.inc new file mode 100644 index 00000000000..9446966c334 --- /dev/null +++ b/gdb/testsuite/gdb.asm/netbsd.inc @@ -0,0 +1,12 @@ + comment "netbsd .note" + +.section ".note.netbsd.ident", "a" + .p2align 2 + + .long 7 + .long 4 + .long 1 + .ascii "NetBSD\0\0" + .long 105010000 + + .p2align 2 |