diff options
author | Joel Brobecker <brobecker@gnat.com> | 2002-07-02 17:05:28 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2002-07-02 17:05:28 +0000 |
commit | 55d9551ccfb3b78b385e1f53c644ea44373c63df (patch) | |
tree | e7bab2bdf97ed2442119b1ca9935e0dcdf6be33b /gdb/solib-osf.c | |
parent | 600e3cc8179c55e0f4ae2715165e9ec036d18e30 (diff) | |
download | gdb-55d9551ccfb3b78b385e1f53c644ea44373c63df.tar.gz |
* 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/solib-osf.c')
-rw-r--r-- | gdb/solib-osf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c index a00e488ee04..6f43a8f0e49 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; |