This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Add OpenBSD/ELF support to gdb.asm/asm-source.exp test
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 31 Jan 2004 15:41:48 +0100 (CET)
- Subject: [PATCH] Add OpenBSD/ELF support to gdb.asm/asm-source.exp test
Subject says it all. Supporting OpenBSD/a.out is simply not worth the
trouble since it uses an assembler that doesn't understand our tricks
with macros. All tests pass for me on sparc-unknown-openbsd3.4 now.
Committed,
Mark
Index: testsuite/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdb.asm/asm-source.exp: Set asm-note to "openbsd" for
*-*-openbsd*.
* gdb.asm/openbsd.inc: New file.
Index: testsuite/gdb.asm/asm-source.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.48
diff -u -p -r1.48 asm-source.exp
--- testsuite/gdb.asm/asm-source.exp 30 Jan 2004 21:23:46 -0000 1.48
+++ testsuite/gdb.asm/asm-source.exp 31 Jan 2004 14:31:02 -0000
@@ -124,6 +124,13 @@ if { [istarget "*-*-netbsdelf*"]
set asm-note "netbsd"
}
+# On OpenBSD/ELF we need a similar note section. We make no attempt
+# of handing a.out here since most OpenBSD/a.out systems use a rather
+# outdated assembler that doesn't assemble this test's code anyway.
+if { [istarget "*-*-openbsd*"] } then {
+ set asm-note "openbsd"
+}
+
# 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
Index: testsuite/gdb.asm/openbsd.inc
===================================================================
RCS file: testsuite/gdb.asm/openbsd.inc
diff -N testsuite/gdb.asm/openbsd.inc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/gdb.asm/openbsd.inc 31 Jan 2004 14:31:02 -0000
@@ -0,0 +1,12 @@
+ comment "openbsd .note"
+
+.section ".note.openbsdbsd.ident", "a"
+ .p2align 2
+
+ .long 8
+ .long 4
+ .long 1
+ .ascii "OpenBSD\0\0"
+ .long 200311
+
+ .p2align 2