gdb/testsuite/
authorYao Qi <yao@codesourcery.com>
Tue, 17 Sep 2013 07:00:50 +0000 (07:00 +0000)
committerYao Qi <yao@codesourcery.com>
Tue, 17 Sep 2013 07:00:50 +0000 (07:00 +0000)
* 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.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/catch-load.c
gdb/testsuite/gdb.base/catch-load.exp

index 328bdf372f9b3208f1fac852782987c74d2934bd..8d34fb892afc577b25bcb6a51b1ba831829fef2b 100644 (file)
@@ -1,3 +1,12 @@
+2013-09-17  Yao Qi  <yao@codesourcery.com>
+
+       * 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  <dje@google.com>
 
        * lib/gdb.exp (using_fission): New proc.
index 9a0010edfc10e71a8fd2d27c9bf3f8d5ed403091..33c0a663a9c4a27f879d4d3f2b6ae4c89ce4904b 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include <dlfcn.h>
 #include <stdio.h>
 
+#ifdef __WIN32__
+#include <windows.h>
+#define dlopen(name, mode) LoadLibrary (TEXT (name))
+#define dlclose(handle) FreeLibrary (handle)
+#else
+#include <dlfcn.h>
+#endif
+
 /* This is updated by the .exp file.  */
 char *libname = "catch-load-so.so";
 
index 4bcaa44d696f0eb518589b8615062d484edf29f5..28445b8a8594a0d24bbe9177e3228667117c44b6 100644 (file)
@@ -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 {