diff options
author | Kevin Buettner <kevinb@redhat.com> | 2004-03-11 17:04:40 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2004-03-11 17:04:40 +0000 |
commit | f8766ec10093029c944914de6c048d015e8dd5db (patch) | |
tree | b0f82755546128ccd553211908c7ed1f32c655fe /gdb/solib-svr4.c | |
parent | 9e07f89d62dc00b9a77100f5bc042e080d3519da (diff) | |
download | gdb-f8766ec10093029c944914de6c048d015e8dd5db.zip gdb-f8766ec10093029c944914de6c048d015e8dd5db.tar.gz gdb-f8766ec10093029c944914de6c048d015e8dd5db.tar.bz2 |
* solist.h (master_so_list): New function.
* solib.c (master_so_list): Likewise.
* solib-svr4.c (enable_break): Iterate over so_list entries
obtained from master list instead of entries obtained directly
via svr4_current_sos().
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r-- | gdb/solib-svr4.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 4f4664c..020a55c 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1004,7 +1004,7 @@ enable_break (void) char *buf; CORE_ADDR load_addr = 0; int load_addr_found = 0; - struct so_list *inferior_sos; + struct so_list *so; bfd *tmp_bfd = NULL; struct target_ops *tmp_bfd_target; int tmp_fd = -1; @@ -1047,23 +1047,19 @@ enable_break (void) target will also close the underlying bfd. */ tmp_bfd_target = target_bfd_reopen (tmp_bfd); - /* If the entry in _DYNAMIC for the dynamic linker has already - been filled in, we can read its base address from there. */ - inferior_sos = svr4_current_sos (); - if (inferior_sos) + /* On a running target, we can get the dynamic linker's base + address from the shared library table. */ + solib_add (NULL, 0, NULL, auto_solib_add); + so = master_so_list (); + while (so) { - /* Connected to a running target. Update our shared library table. */ - solib_add (NULL, 0, NULL, auto_solib_add); - } - while (inferior_sos) - { - if (strcmp (buf, inferior_sos->so_original_name) == 0) + if (strcmp (buf, so->so_original_name) == 0) { load_addr_found = 1; - load_addr = LM_ADDR (inferior_sos); + load_addr = LM_ADDR (so); break; } - inferior_sos = inferior_sos->next; + so = so->next; } /* Otherwise we find the dynamic linker's base address by examining |