From: Yao Qi Date: Tue, 17 Sep 2013 07:00:50 +0000 (+0000) Subject: gdb/testsuite/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57b0d98e591b1fcb1ff008e98e042bb9183b595b;p=binutils-gdb.git gdb/testsuite/ * gdb.base/catch-load.c: Remove the include of "dlfcn.h". [__WIN32__]: Include "windows.h" and define macro dlopen and dlclose. [!__WIN32__]: Include "dlfcn.h". * gdb.base/catch-load.exp (one_catch_load_test): Match directory separator. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 328bdf372f9..8d34fb892af 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2013-09-17 Yao Qi + + * gdb.base/catch-load.c: Remove the include of "dlfcn.h". + [__WIN32__]: Include "windows.h" and define macro dlopen + and dlclose. + [!__WIN32__]: Include "dlfcn.h". + * gdb.base/catch-load.exp (one_catch_load_test): Match + directory separator. + 2013-09-16 Doug Evans * lib/gdb.exp (using_fission): New proc. diff --git a/gdb/testsuite/gdb.base/catch-load.c b/gdb/testsuite/gdb.base/catch-load.c index 9a0010edfc1..33c0a663a9c 100644 --- a/gdb/testsuite/gdb.base/catch-load.c +++ b/gdb/testsuite/gdb.base/catch-load.c @@ -15,9 +15,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include #include +#ifdef __WIN32__ +#include +#define dlopen(name, mode) LoadLibrary (TEXT (name)) +#define dlclose(handle) FreeLibrary (handle) +#else +#include +#endif + /* This is updated by the .exp file. */ char *libname = "catch-load-so.so"; diff --git a/gdb/testsuite/gdb.base/catch-load.exp b/gdb/testsuite/gdb.base/catch-load.exp index 4bcaa44d696..28445b8a859 100644 --- a/gdb/testsuite/gdb.base/catch-load.exp +++ b/gdb/testsuite/gdb.base/catch-load.exp @@ -64,7 +64,7 @@ proc one_catch_load_test {scenario kind match sostop} { gdb_test "catch $kind" "Catchpoint $decimal \\(.*\\)" gdb_test_multiple "continue" "continue" { - -re "Catchpoint $decimal\r\n.*loaded .*/$testfile2.*\r\n.*$gdb_prompt $" { + -re "Catchpoint $decimal\r\n.*loaded .*(\\\\|/)$testfile2.*\r\n.*$gdb_prompt $" { if {$match} { pass "continue" } else {