+2001-10-31 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (register_loaded_dll): Attempt to ensure that the case of
+ the loaded DLL matches the on-disk case since the debugging API does
+ not seem to ensure this. Calculate max name length here.
+ (handle_load_dll): Move max name length calculation to
+ register_loaded_dll.
+
2001-10-31 Daniel Jacobowitz <drow@mvista.com>
* arm-linux-nat.c: Include <asm/ptrace.h> explicitly.
{
struct so_stuff *so;
char ppath[MAX_PATH + 1];
- cygwin_conv_to_posix_path (name, ppath);
+ char buf[MAX_PATH + 1];
+ char cwd[MAX_PATH + 1];
+ char *p;
+ WIN32_FIND_DATA w32_fd;
+ HANDLE h = FindFirstFile(name, &w32_fd);
+ size_t len;
+
+ FindClose (h);
+ strcpy (buf, name);
+ if (GetCurrentDirectory (MAX_PATH + 1, cwd))
+ {
+ p = strrchr (buf, '\\');
+ if (p)
+ p[1] = '\0';
+ SetCurrentDirectory (buf);
+ GetFullPathName (w32_fd.cFileName, MAX_PATH, buf, &p);
+ SetCurrentDirectory (cwd);
+ }
+
+ cygwin_conv_to_posix_path (buf, ppath);
so = (struct so_stuff *) xmalloc (sizeof (struct so_stuff) + strlen (ppath) + 8 + 1);
so->loaded = 0;
so->load_addr = load_addr;
solib_end->next = so;
solib_end = so;
so->next = NULL;
+ len = strlen (ppath);
+ if (len > max_dll_name_len)
+ max_dll_name_len = len;
}
/* Wait for child to do something. Return pid of child, or -1 in case
DWORD done;
char dll_buf[MAX_PATH + 1];
char *dll_name = NULL;
- int len;
char *p;
dll_buf[0] = dll_buf[sizeof (dll_buf) - 1] = '\0';
if (!dll_name)
return 1;
- while ((p = strchr (dll_name, '\\')))
- *p = '/';
-
register_loaded_dll (dll_name, (DWORD) event->lpBaseOfDll + 0x1000);
- len = strlen (dll_name);
- if (len > max_dll_name_len)
- max_dll_name_len = len;
return 1;
}
{
struct so_stuff *so;
char ppath[MAX_PATH + 1];
- cygwin_conv_to_posix_path (name, ppath);
+ char buf[MAX_PATH + 1];
+ char cwd[MAX_PATH + 1];
+ char *p;
+ WIN32_FIND_DATA w32_fd;
+ HANDLE h = FindFirstFile(name, &w32_fd);
+ size_t len;
+
+ FindClose (h);
+ strcpy (buf, name);
+ if (GetCurrentDirectory (MAX_PATH + 1, cwd))
+ {
+ p = strrchr (buf, '\\');
+ if (p)
+ p[1] = '\0';
+ SetCurrentDirectory (buf);
+ GetFullPathName (w32_fd.cFileName, MAX_PATH, buf, &p);
+ SetCurrentDirectory (cwd);
+ }
+
+ cygwin_conv_to_posix_path (buf, ppath);
so = (struct so_stuff *) xmalloc (sizeof (struct so_stuff) + strlen (ppath) + 8 + 1);
so->loaded = 0;
so->load_addr = load_addr;
solib_end->next = so;
solib_end = so;
so->next = NULL;
+ len = strlen (ppath);
+ if (len > max_dll_name_len)
+ max_dll_name_len = len;
}
/* Wait for child to do something. Return pid of child, or -1 in case
DWORD done;
char dll_buf[MAX_PATH + 1];
char *dll_name = NULL;
- int len;
char *p;
dll_buf[0] = dll_buf[sizeof (dll_buf) - 1] = '\0';
if (!dll_name)
return 1;
- while ((p = strchr (dll_name, '\\')))
- *p = '/';
-
register_loaded_dll (dll_name, (DWORD) event->lpBaseOfDll + 0x1000);
- len = strlen (dll_name);
- if (len > max_dll_name_len)
- max_dll_name_len = len;
return 1;
}