This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
gdbserver/win32, special case ntdll.dll.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 26 Nov 2009 22:23:39 +0000
- Subject: gdbserver/win32, special case ntdll.dll.
I've applied this patch to make gdbserver always be able to report
the full path of ntdll.dll to gdb. This is exactly what gdb does too.
2009-11-26 Pedro Alves <pedro@codesourcery.com>
gdb/gdbserver/
* win32-low.c (win32_add_one_solib): If dll name is "ntdll.dll",
prepend the system directory to the full dll path.
---
gdb/gdbserver/win32-low.c | 8 ++++++++
1 file changed, 8 insertions(+)
Index: src/gdb/gdbserver/win32-low.c
===================================================================
--- src.orig/gdb/gdbserver/win32-low.c 2009-07-04 20:41:48.000000000 +0100
+++ src/gdb/gdbserver/win32-low.c 2009-11-26 19:20:00.000000000 +0000
@@ -906,6 +906,14 @@ win32_add_one_solib (const char *name, C
#endif
}
+#ifndef _WIN32_WCE
+ if (strcasecmp (buf, "ntdll.dll") == 0)
+ {
+ GetSystemDirectoryA (buf, sizeof (buf));
+ strcat (buf, "\\ntdll.dll");
+ }
+#endif
+
#ifdef __CYGWIN__
cygwin_conv_to_posix_path (buf, buf2);
#else