aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2011-05-24 12:01:22 +0000
committerPierre Muller <muller@sourceware.org>2011-05-24 12:01:22 +0000
commitee5683ab05022bd68d5200b74cf00def28785076 (patch)
tree68255f924268a75765c1a0b00b56eb2dd61a447e /gdb/testsuite
parentc91c8c16124ce11be0ee4490a5d1606236fca1bb (diff)
downloadgdb-ee5683ab05022bd68d5200b74cf00def28785076.zip
gdb-ee5683ab05022bd68d5200b74cf00def28785076.tar.gz
gdb-ee5683ab05022bd68d5200b74cf00def28785076.tar.bz2
../commit.txt~
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog17
-rw-r--r--gdb/testsuite/gdb.arch/i386-bp_permanent.exp6
-rw-r--r--gdb/testsuite/gdb.arch/i386-gnu-cfi.exp6
-rw-r--r--gdb/testsuite/gdb.arch/i386-permbkpt.exp8
-rw-r--r--gdb/testsuite/gdb.arch/i386-prologue.exp6
-rw-r--r--gdb/testsuite/gdb.arch/i386-size-overlap.exp6
-rw-r--r--gdb/testsuite/gdb.arch/i386-size.exp6
-rw-r--r--gdb/testsuite/gdb.arch/i386-unwind.exp6
-rw-r--r--gdb/testsuite/gdb.reverse/i386-precsave.exp6
-rw-r--r--gdb/testsuite/gdb.reverse/i386-reverse.exp6
-rw-r--r--gdb/testsuite/gdb.reverse/i386-sse-reverse.exp6
-rw-r--r--gdb/testsuite/gdb.reverse/i387-env-reverse.exp6
-rw-r--r--gdb/testsuite/gdb.reverse/i387-stack-reverse.exp6
-rw-r--r--gdb/testsuite/lib/gdb.exp16
14 files changed, 46 insertions, 61 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index b21ca76..fad1f65 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,20 @@
+2011-05-24 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ Centralize -DSYMBOL_PREFIX=\"_\" additional flags in gdb.exp.
+ * lib/gdb.exp (gdb_target_symbol_prefix_flags): New procedure.
+ * gdb.arch/i386-bp_permanent.exp: Use gdb_target_symbol_prefix_flags.
+ * gdb.arch/i386-gnu-cfi.exp: Likewise.
+ * gdb.arch/i386-permbkpt.exp: Likewise.
+ * gdb.arch/i386-prologue.exp: Likewise.
+ * gdb.arch/i386-size-overlap.exp: Likewise.
+ * gdb.arch/i386-size.exp: Likewise.
+ * gdb.arch/i386-unwind.exp: Likewise.
+ * gdb.reverse/i386-precsave.exp: Likewise.
+ * gdb.reverse/i386-reverse.exp: Likewise.
+ * gdb.reverse/i386-sse-reverse.exp: Likewise.
+ * gdb.reverse/i387-env-reverse.exp: Likewise.
+ * gdb.reverse/i387-stack-reverse.exp: Likewise.
+
2011-05-24 Pedro Alves <pedro@codesourcery.com>
* gdb.trace/tfile.exp: Add test that opening the basic.tf trace
diff --git a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
index 3b39d78..fd3640a 100644
--- a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
+++ b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
@@ -32,11 +32,7 @@ set srcfile i386-prologue.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if [istarget "i?86-*-cygwin*"] then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
# Don't use "debug", so that we don't have line information for the assembly
# fragments.
diff --git a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
index 10d5740..016302c 100644
--- a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
+++ b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
@@ -38,11 +38,7 @@ set srcfileasm ${testfile}-asm.S
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
if { [gdb_compile "${srcdir}/${subdir}/${srcfilec} ${srcdir}/${subdir}/${srcfileasm}" "${binfile}" executable [list debug $additional_flags]] != "" } {
untested i386-gnu-cfi.exp
diff --git a/gdb/testsuite/gdb.arch/i386-permbkpt.exp b/gdb/testsuite/gdb.arch/i386-permbkpt.exp
index 4805ca4..9e10bb7 100644
--- a/gdb/testsuite/gdb.arch/i386-permbkpt.exp
+++ b/gdb/testsuite/gdb.arch/i386-permbkpt.exp
@@ -31,12 +31,8 @@ set testfile "i386-permbkpt"
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}
-# Some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=_"
-}
+# some targets have leading underscores on assembly symbols.
+set additional_flags [gdb_target_symbol_prefix_flags]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
untested i386-permbkpt.exp
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp
index 46962f3..f69c42b 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue.exp
@@ -36,11 +36,7 @@ set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
# Don't use "debug", so that we don't have line information for the assembly
# fragments.
diff --git a/gdb/testsuite/gdb.arch/i386-size-overlap.exp b/gdb/testsuite/gdb.arch/i386-size-overlap.exp
index 96ec641..b2c8dbf 100644
--- a/gdb/testsuite/gdb.arch/i386-size-overlap.exp
+++ b/gdb/testsuite/gdb.arch/i386-size-overlap.exp
@@ -31,11 +31,7 @@ set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if [istarget "i?86-*-cygwin*"] then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug $additional_flags]] != "" } {
diff --git a/gdb/testsuite/gdb.arch/i386-size.exp b/gdb/testsuite/gdb.arch/i386-size.exp
index 09b057d..0fc5107 100644
--- a/gdb/testsuite/gdb.arch/i386-size.exp
+++ b/gdb/testsuite/gdb.arch/i386-size.exp
@@ -34,11 +34,7 @@ set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if [istarget "i?86-*-cygwin*"] then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug $additional_flags]] != "" } {
diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp
index 9b3f67b..c6c215e 100644
--- a/gdb/testsuite/gdb.arch/i386-unwind.exp
+++ b/gdb/testsuite/gdb.arch/i386-unwind.exp
@@ -36,11 +36,7 @@ set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
untested i386-unwind.exp
diff --git a/gdb/testsuite/gdb.reverse/i386-precsave.exp b/gdb/testsuite/gdb.reverse/i386-precsave.exp
index bb3feca..10d8ba3 100644
--- a/gdb/testsuite/gdb.reverse/i386-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/i386-precsave.exp
@@ -39,11 +39,7 @@ set srcfile i386-reverse.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if [istarget "i?86-*-cygwin*"] then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
untested ${testfile}.exp
diff --git a/gdb/testsuite/gdb.reverse/i386-reverse.exp b/gdb/testsuite/gdb.reverse/i386-reverse.exp
index adb17cf..f9fda5e 100644
--- a/gdb/testsuite/gdb.reverse/i386-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/i386-reverse.exp
@@ -38,11 +38,7 @@ set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if [istarget "i?86-*-cygwin*"] then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
untested i386-reverse
diff --git a/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp b/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp
index 6de49c5..3e76643 100644
--- a/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp
@@ -38,11 +38,7 @@ set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if [istarget "i?86-*-cygwin*"] then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
untested i386-sse-reverse
diff --git a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
index 57b4346..d56cbe5 100644
--- a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
@@ -30,11 +30,7 @@ set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if [istarget "i?86-*-cygwin*"] then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
untested ${testfile}.exp
diff --git a/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp b/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
index 14b1b7e..10ea55e 100644
--- a/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
@@ -30,11 +30,7 @@ set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols.
-# TODO: detect this automatically
-set additional_flags ""
-if [istarget "i?86-*-cygwin*"] then {
- set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
-}
+set additional_flags [gdb_target_symbol_prefix_flags]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
untested ${testfile}.exp
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 169ae1c..4f5b796 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3658,3 +3658,19 @@ proc core_find {binfile {deletefiles {}} {arg ""}} {
}
return $destcore
}
+
+# gdb_target_symbol_prefix_flags returns a string that can be added
+# to gdb_compile options to define SYMBOL_PREFIX macro value
+# symbol_prefix_flags returns a string that can be added
+# for targets that use underscore as symbol prefix.
+# TODO: find out automatically if the target needs this.
+
+proc gdb_target_symbol_prefix_flags {} {
+ if { [istarget "*-*-cygwin*"] || [istarget "i?86-*-mingw*"]
+ || [istarget "*-*-msdosdjgpp*"] || [istarget "*-*-go32*"] } {
+ return "additional_flags=-DSYMBOL_PREFIX=\"_\""
+ } else {
+ return ""
+ }
+}
+