* win32-nat.c (register_loaded_dll): Just use raw name when we can't find the
authorChristopher Faylor <me+cygwin@cgf.cx>
Fri, 22 Feb 2002 01:35:59 +0000 (01:35 +0000)
committerChristopher Faylor <me+cygwin@cgf.cx>
Fri, 22 Feb 2002 01:35:59 +0000 (01:35 +0000)
complete path to a loaded DLL.

gdb/ChangeLog
gdb/win32-nat.c
gdb/windows-nat.c

index 4a1808ecb498dabbe570be2bfe7d227da2a22a2f..02c3e792cc297934cecc97ecbb577d6d33aba75e 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-21  Christopher Faylor  <cgf@redhat.com>
+
+       * win32-nat.c (register_loaded_dll): Just use raw name when we can't
+       find the complete path to a loaded DLL.
+
 2002-02-21  Fred Fish  <fnf@redhat.com>
 
        * dbxread.c (process_one_symbol): When finding an N_FUN symbol
index cd288be2c74f8a26e737a1e9dafd27169156bbec..2ef28e0e5386cac3104e2f2800d754a6c29fa83f 100644 (file)
@@ -582,7 +582,9 @@ register_loaded_dll (const char *name, DWORD load_addr)
   HANDLE h = FindFirstFile(name, &w32_fd);
   size_t len;
 
-  if (h != INVALID_HANDLE_VALUE)
+  if (h == INVALID_HANDLE_VALUE)
+    strcpy (buf, name);
+  else
     {
       FindClose (h);
       strcpy (buf, name);
index cd288be2c74f8a26e737a1e9dafd27169156bbec..2ef28e0e5386cac3104e2f2800d754a6c29fa83f 100644 (file)
@@ -582,7 +582,9 @@ register_loaded_dll (const char *name, DWORD load_addr)
   HANDLE h = FindFirstFile(name, &w32_fd);
   size_t len;
 
-  if (h != INVALID_HANDLE_VALUE)
+  if (h == INVALID_HANDLE_VALUE)
+    strcpy (buf, name);
+  else
     {
       FindClose (h);
       strcpy (buf, name);