diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-05-16 14:21:47 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-05-16 14:21:47 +0000 |
commit | 93f02886fd15eef1d38f073c54031c812e564128 (patch) | |
tree | 1de4fdb193679af5546c9be4f2f12f86149970c1 /gdb/testsuite/gdb.base/unload.exp | |
parent | 1a69e1e46aabbd453ddb0a6b4f605db4e2686018 (diff) | |
download | gdb-93f02886fd15eef1d38f073c54031c812e564128.zip gdb-93f02886fd15eef1d38f073c54031c812e564128.tar.gz gdb-93f02886fd15eef1d38f073c54031c812e564128.tar.bz2 |
* lib/gdb.exp (gdb_compile): Add support for Windows DLLs.
(gdb_compile_shlib): Likewise.
(skip_shlib_tests, gdb_download, gdb_load_shlibs): New.
(default_gdb_init): Clear cleanfiles.
(gdb_finish): Delete recorded cleanfiles.
* lib/gdbserver-support.exp (gdbserver_spawn): Use gdb_download.
* gdb.base/gdb1555.exp: Use skip_shlib_tests and gdb_load_shlibs.
Do not use isnative.
* gdb.base/pending.exp, gdb.base/shlib-call.exp, gdb.base/shreloc.exp,
gdb.base/so-impl-ld.exp: Likewise.
* gdb.base/solib-weak.exp: Likewise. Skip for DLL targets.
* gdb.base/unload.exp: Likewise. Do not pass empty option to
gdb_compile.
Diffstat (limited to 'gdb/testsuite/gdb.base/unload.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/unload.exp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.base/unload.exp b/gdb/testsuite/gdb.base/unload.exp index 105ddc4..1b731f0 100644 --- a/gdb/testsuite/gdb.base/unload.exp +++ b/gdb/testsuite/gdb.base/unload.exp @@ -26,8 +26,15 @@ if $tracelevel then { set prms_id 0 set bug_id 0 -# are we on a target board? -if ![isnative] then { +if {[skip_shlib_tests]} { + return 0 +} + +# TODO: Use LoadLibrary on these targets instead of dlopen. +if {([istarget arm*-*-symbianelf*] + || [istarget *-*-mingw*] + || [istarget *-*-cygwin*] + || [istarget *-*-pe*])} { return 0 } @@ -40,17 +47,16 @@ set shlibdir ${objdir}/${subdir} set libsrc $srcdir/$subdir/$libfile.c set lib_sl $objdir/$subdir/$libfile.sl -set dl_lib_flag "" +set lib_opts debug +set exec_opts [list debug additional_flags=-DSHLIB_DIR\=\"${shlibdir}\"] + switch -glob [istarget] { "hppa*-hp-hpux*" { } - "*-*-linux*" { set dl_lib_flag "libs=-ldl" } - "*-*-solaris*" { set dl_lib_flag "libs=-ldl" } + "*-*-linux*" { lappend exec_opts "libs=-ldl" } + "*-*-solaris*" { lappend exec_opts "libs=-ldl" } default { } } -set lib_opts debug -set exec_opts [list debug $dl_lib_flag additional_flags=-DSHLIB_DIR\=\"${shlibdir}\"] - if [get_compiler_info ${binfile}] { return -1 } @@ -67,6 +73,7 @@ gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} +gdb_load_shlibs $lib_sl if [target_info exists gdb_stub] { gdb_step_for_stub; |