aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp16
1 files changed, 16 insertions, 0 deletions
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 ""
+ }
+}
+