aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2002-07-02 17:05:28 +0000
committerJoel Brobecker <brobecker@gnat.com>2002-07-02 17:05:28 +0000
commit7a5a05349e7ea7749d253dc1f201f7aea5497b79 (patch)
treea7be9b99e3bffa5b20398a76dab05839808e1193 /gdb
parentb7d15bf718babb370592c2ca200cb1d2f22aa8a2 (diff)
downloadgdb-7a5a05349e7ea7749d253dc1f201f7aea5497b79.zip
gdb-7a5a05349e7ea7749d253dc1f201f7aea5497b79.tar.gz
gdb-7a5a05349e7ea7749d253dc1f201f7aea5497b79.tar.bz2
* solib-osf.c (open_map): Compute the list of shared libraries
loaded by the inferior, rather than the list of libraries loaded by GDB itself. Otherwise, GDB ends up reading the symbols from the wrong shared libraries...
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/solib-osf.c9
2 files changed, 15 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 07bfffd..cc07fd9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2002-07-02 Joel Brobecker <brobecker@gnat.com>
+
+ * solib-osf.c (open_map): Compute the list of shared libraries
+ loaded by the inferior, rather than the list of libraries loaded
+ by GDB itself. Otherwise, GDB ends up reading the symbols from
+ the wrong shared libraries...
+
2002-07-02 Mark Kettenis <kettenis@gnu.org>
* i386-linux-tdep.c (i386_linux_sigcontext_addr): Make static.
diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c
index a00e488..6f43a8f 100644
--- a/gdb/solib-osf.c
+++ b/gdb/solib-osf.c
@@ -359,7 +359,14 @@ static int
open_map (struct read_map_ctxt *ctxt)
{
#ifdef USE_LDR_ROUTINES
- ctxt->proc = ldr_my_process ();
+ /* Note: As originally written, ldr_my_process() was used to obtain
+ the value for ctxt->proc. This is incorrect, however, since
+ ldr_my_process() retrieves the "unique identifier" associated
+ with the current process (i.e. GDB) and not the one being
+ debugged. Presumably, the pid of the process being debugged is
+ compatible with the "unique identifier" used by the ldr_
+ routines, so we use that. */
+ ctxt->proc = ptid_get_pid (inferior_ptid);
if (ldr_xattach (ctxt->proc) != 0)
return 0;
ctxt->next = LDR_NULL_MODULE;