aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-03-12 19:17:01 +0000
committerPedro Alves <palves@redhat.com>2010-03-12 19:17:01 +0000
commit759f0f0b7b0ca3e620e3dea8e69979739fb9536f (patch)
tree844ee111811bb3b7ce0dd7d9b3e4a5f3a4b06f8b /gdb/testsuite/lib
parentc942923237c7ae29a0d1766383cb747b2a34b7ad (diff)
downloadgdb-759f0f0b7b0ca3e620e3dea8e69979739fb9536f.zip
gdb-759f0f0b7b0ca3e620e3dea8e69979739fb9536f.tar.gz
gdb-759f0f0b7b0ca3e620e3dea8e69979739fb9536f.tar.bz2
gdb/testsuite/
* lib/gdb.exp (skip_stl_tests): New. (gdb_compile): Symbian needs -ldl. (shlib_target_file): New. (shlib_symbol_file): New. (gdb_load_shlibs): Use shlib_target_file. * lib/mi-support.exp (mi_load_shlibs): Use shlib_target_file. * gdb.cp/exception.exp: Use skip_stl_tests. * gdb.cp/bs15503.exp: Use skip_stl_tests. Use untested. * gdb.cp/try_catch.exp: Use skip_stl_tests. * gdb.cp/mb-templates.exp: Ditto. * gdb.base/commands.exp: Relax regexes. * gdb.base/watchpoint-solib.exp: Don't skip on symbian. Use shlib_target_file and shlib_symbol_file. * gdb.base/maint.exp: Allow lowercase t. Allow .rodata in sections. * gdb.base/ending-run.exp: Accept E32Main for symbian. * gdb.base/solib-disc.exp: Use shlib_target_file and shlib_symbol_file. * gdb.base/unload.exp: Don't skip on symbian. Use shlib_target_file and shlib_symbol_file. * gdb.base/list.exp: Check use_gdb_stub instead of is_remote.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp35
-rw-r--r--gdb/testsuite/lib/mi-support.exp3
2 files changed, 35 insertions, 3 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index fbe0285..01ebc52 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1281,6 +1281,18 @@ proc skip_cplus_tests {} {
return 0
}
+# Return a 1 for configurations for which don't have both C++ and the STL.
+
+proc skip_stl_tests {} {
+ # Symbian supports the C++ language, but the STL is missing
+ # (both headers and libraries).
+ if { [istarget "arm*-*-symbianelf*"] } {
+ return 1
+ }
+
+ return [skip_cplus_tests]
+}
+
# Return a 1 if I don't even want to try to test FORTRAN.
proc skip_fortran_tests {} {
@@ -1808,11 +1820,14 @@ proc gdb_compile {source dest type options} {
if { ([istarget "*-*-mingw*"]
|| [istarget *-*-cygwin*]
|| [istarget *-*-pe*]
- || [istarget arm*-*-symbianelf*]
|| [istarget hppa*-*-hpux*])} {
# Do not need anything.
} elseif { [istarget *-*-openbsd*] } {
lappend new_options "additional_flags=-Wl,-rpath,${outdir}"
+ } elseif { [istarget arm*-*-symbianelf*] } {
+ if { $shlib_load } {
+ lappend new_options "libs=-ldl"
+ }
} else {
if { $shlib_load } {
lappend new_options "libs=-ldl"
@@ -2333,6 +2348,22 @@ proc gdb_load_cmd { args } {
return -1
}
+# Return the filename to download to the target and load on the target
+# for this shared library. Normally just LIBNAME, unless shared libraries
+# for this target have separate link and load images.
+
+proc shlib_target_file { libname } {
+ return $libname
+}
+
+# Return the filename GDB will load symbols from when debugging this
+# shared library. Normally just LIBNAME, unless shared libraries for
+# this target have separate link and load images.
+
+proc shlib_symbol_file { libname } {
+ return $libname
+}
+
# gdb_download
#
# Copy a file to the remote target and return its target filename.
@@ -2356,7 +2387,7 @@ proc gdb_load_shlibs { args } {
}
foreach file $args {
- gdb_download $file
+ gdb_download [shlib_target_file $file]
}
# Even if the target supplies full paths for shared libraries,
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 360eceb..ec60ef9 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1850,13 +1850,14 @@ proc check_mi_and_console_threads {name} {
}
}
+# Download shared libraries to the target.
proc mi_load_shlibs { args } {
if {![is_remote target]} {
return
}
foreach file $args {
- gdb_download $file
+ gdb_download [shlib_target_file $file]
}
# Even if the target supplies full paths for shared libraries,