aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-05-06 22:18:39 +0000
committerDoug Evans <dje@google.com>2013-05-06 22:18:39 +0000
commit0892cb63bda9ac0bb2dea19d04ea35b2b54429d6 (patch)
tree27fcdc4f9831db80064df749957797af8555b6fc /gdb/solib-svr4.c
parentfac51dd9e59b66e8427ed00c417cb1bf5b0679ac (diff)
downloadgdb-0892cb63bda9ac0bb2dea19d04ea35b2b54429d6.zip
gdb-0892cb63bda9ac0bb2dea19d04ea35b2b54429d6.tar.gz
gdb-0892cb63bda9ac0bb2dea19d04ea35b2b54429d6.tar.bz2
* solist.h (struct target_so_ops): New member clear_so.
* solib-svr4.c (svr4_clear_so): New function. (_initialize_svr4_solib): Set svr4_so_ops.clear_so. * solib.c (clear_so): Renamed from free_so_symbols. All callers updated. Call target clear_so if it exists.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index f3bff6e..4e09472 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -966,6 +966,14 @@ svr4_free_so (struct so_list *so)
xfree (so->lm_info);
}
+/* Implement target_so_ops.clear_so. */
+
+static void
+svr4_clear_so (struct so_list *so)
+{
+ so->lm_info->l_addr_p = 0;
+}
+
/* Free so_list built so far (called via cleanup). */
static void
@@ -2448,6 +2456,7 @@ _initialize_svr4_solib (void)
svr4_so_ops.relocate_section_addresses = svr4_relocate_section_addresses;
svr4_so_ops.free_so = svr4_free_so;
+ svr4_so_ops.clear_so = svr4_clear_so;
svr4_so_ops.clear_solib = svr4_clear_solib;
svr4_so_ops.solib_create_inferior_hook = svr4_solib_create_inferior_hook;
svr4_so_ops.special_symbol_handling = svr4_special_symbol_handling;