From 9c3eea2f53a791fe4f7624b68e3503fb2ae0d8b4 Mon Sep 17 00:00:00 2001 From: qiyao Date: Fri, 11 Oct 2013 07:27:45 +0000 Subject: gdb/testsuite/ * gdb.mi/mi-catch-load.c: Remove the include of "dlfcn.h". [__WIN32__]: Include "windows.h" and define macro 'dlopen' and 'dlclose'. [!__WIN32__]: Include "dlfcn.h". * gdb.mi/mi-catch-load.exp: Set up kfail. --- gdb/testsuite/ChangeLog | 8 ++++++++ gdb/testsuite/gdb.mi/mi-catch-load.c | 9 ++++++++- gdb/testsuite/gdb.mi/mi-catch-load.exp | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a9a3fb14b82..c2a15930656 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2013-10-11 Yao Qi + + * gdb.mi/mi-catch-load.c: Remove the include of "dlfcn.h". + [__WIN32__]: Include "windows.h" and define macro 'dlopen' + and 'dlclose'. + [!__WIN32__]: Include "dlfcn.h". + * gdb.mi/mi-catch-load.exp: Set up kfail. + 2013-10-10 Andreas Arnez * lib/gdb.exp (gdb_core_cmd): Replace fixed string "re-load diff --git a/gdb/testsuite/gdb.mi/mi-catch-load.c b/gdb/testsuite/gdb.mi/mi-catch-load.c index 83efda8bde4..8fa45ad6a48 100644 --- a/gdb/testsuite/gdb.mi/mi-catch-load.c +++ b/gdb/testsuite/gdb.mi/mi-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 + char *libname = "mi-catch-load-so.so"; int diff --git a/gdb/testsuite/gdb.mi/mi-catch-load.exp b/gdb/testsuite/gdb.mi/mi-catch-load.exp index 64c1f1110a6..2b537ddfa69 100644 --- a/gdb/testsuite/gdb.mi/mi-catch-load.exp +++ b/gdb/testsuite/gdb.mi/mi-catch-load.exp @@ -58,6 +58,7 @@ gdb_expect { pass "catch-load: solib-event stop" } -re ".*$mi_gdb_prompt$" { + setup_kfail mi/15945 *-*-*mingw* fail "catch-load: solib-event stop" } timeout { @@ -85,6 +86,7 @@ gdb_expect { pass "catch-unload: solib-event stop" } -re ".*$mi_gdb_prompt$" { + setup_kfail mi/15945 *-*-*mingw* fail "catch-unload: solib-event stop" } timeout { -- cgit v1.2.1