aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/unload.exp
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-07-17 12:51:41 +0000
committerDaniel Jacobowitz <drow@false.org>2007-07-17 12:51:41 +0000
commit255e7678a93693bd4d16cc3246442a1b8e11064e (patch)
treee30bf1ce55c5475d65bb16a04e840be2d61b8ab7 /gdb/testsuite/gdb.base/unload.exp
parenta8c50c1f557c99062f17be4a7b9d1c596771e4c1 (diff)
downloadfsf-binutils-gdb-255e7678a93693bd4d16cc3246442a1b8e11064e.zip
fsf-binutils-gdb-255e7678a93693bd4d16cc3246442a1b8e11064e.tar.gz
fsf-binutils-gdb-255e7678a93693bd4d16cc3246442a1b8e11064e.tar.bz2
2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
Daniel Jacobowitz <dan@codesourcery.com> * config/i386/cygwin.mt (TDEPFILES): Add solib-target.o. * coff-pe-read.c (read_pe_exported_syms): Delete verbose printf. * NEWS: Mention gdbserver DLL support. * gdb.base/unload.c (dlopen, dlsym, dlclose, dlerror): Define for __WIN32__. (SHLIB_NAME): Delete definition. Always pass dlerror to fprintf. * gdb.base/unload.exp: Use shared library test routines. * inferiors.c (all_dlls, dlls_changed, get_dll): New. (add_thread): Minor cleanups. (clear_inferiors): Move lower in the file. Clear the DLL list. (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New. * remote-utils.c (prepare_resume_reply): Check dlls_changed. (xml_escape_text): New. * server.c (handle_query): Handle qXfer:libraries:read. Report it for qSupported. (handle_v_cont): Report errors. (gdbserver_version): Update. (main): Correct size of own_buf. Do not report initial DLL events. * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll) (unloaded_dll, xml_escape_text): New. * win32-low.c (enum target_waitkind): Update comments. (win32_add_one_solib, get_image_name, winapi_EnumProcessModules) (winapi_GetModuleInformation, winapi_GetModuleFileNameExA) (win32_EnumProcessModules, win32_GetModuleInformation) (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name) (winapi_CreateToolhelp32Snapshot, winapi_Module32First) (winapi_Module32Next, win32_CreateToolhelp32Snapshot) (win32_Module32First, win32_Module32Next, load_toolhelp) (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New. (get_child_debug_event): Handle DLL events. (win32_wait): Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.base/unload.exp')
-rw-r--r--gdb/testsuite/gdb.base/unload.exp23
1 files changed, 7 insertions, 16 deletions
diff --git a/gdb/testsuite/gdb.base/unload.exp b/gdb/testsuite/gdb.base/unload.exp
index 1b731f0..78090b9 100644
--- a/gdb/testsuite/gdb.base/unload.exp
+++ b/gdb/testsuite/gdb.base/unload.exp
@@ -30,37 +30,28 @@ 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*])} {
+# TODO: Use LoadLibrary on this target instead of dlopen.
+if {[istarget arm*-*-symbianelf*]} {
return 0
}
set testfile "unload"
set libfile "unloadshr"
+set libname "${libfile}.sl"
set libsrcfile ${libfile}.c
set srcfile $srcdir/$subdir/$testfile.c
set binfile $objdir/$subdir/$testfile
set shlibdir ${objdir}/${subdir}
set libsrc $srcdir/$subdir/$libfile.c
-set lib_sl $objdir/$subdir/$libfile.sl
-
-set lib_opts debug
-set exec_opts [list debug additional_flags=-DSHLIB_DIR\=\"${shlibdir}\"]
-
-switch -glob [istarget] {
- "hppa*-hp-hpux*" { }
- "*-*-linux*" { lappend exec_opts "libs=-ldl" }
- "*-*-solaris*" { lappend exec_opts "libs=-ldl" }
- default { }
-}
+set lib_sl $objdir/$subdir/$libname
if [get_compiler_info ${binfile}] {
return -1
}
+set lib_opts debug
+set exec_opts [list debug shlib_load additional_flags=-DSHLIB_NAME\=\"${libname}\"]
+
if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|| [gdb_compile $srcfile $binfile executable $exec_opts] != ""} {
untested "Couldn't compile $libsrc or $srcfile."