[RFA 8/14] Changes to solib-osf.c
Gary Benson
gbenson@redhat.com
Thu Jul 11 10:40:00 GMT 2013
This patch modifies osf_free_so to free the containing so_list object,
and modifies its various local callers accordingly.
-------------- next part --------------
2013-07-10 Gary Benson <gbenson@redhat.com>
* solib-osf.c (osf_free_so): Rename to osf_free_so_local.
(osf_free_so_local): Rename from osf_free_so.
(osf_free_so): New method.
(read_map): Replace call to osf_free_so with osf_free_so_local.
(osf_current_sos): Likewise.
(osf_open_symbol_file_object): Likewise.
diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c
index d05c5c1..bebab9e 100644
--- a/gdb/solib-osf.c
+++ b/gdb/solib-osf.c
@@ -255,10 +255,10 @@ osf_relocate_section_addresses (struct so_list *so,
}
}
-/* target_so_ops callback. Free parts of SO allocated by this file. */
+/* Free parts of SO allocated by this file. */
static void
-osf_free_so (struct so_list *so)
+osf_free_so_local (struct so_list *so)
{
int i;
const char *name;
@@ -272,6 +272,15 @@ osf_free_so (struct so_list *so)
xfree (so->lm_info);
}
+/* target_so_ops callback. */
+
+static void
+osf_free_so (struct so_list *so)
+{
+ osf_free_so_local (so);
+ xfree (so);
+}
+
/* target_so_ops callback. Discard information accumulated by this file and
not freed by osf_free_so(). */
@@ -517,7 +526,7 @@ read_map (struct read_map_ctxt *ctxt, struct so_list *so)
return 1;
err:
- osf_free_so (so);
+ osf_free_so_local (so);
return 0;
}
@@ -554,7 +563,7 @@ osf_current_sos (void)
/sbin/loader. */
if (!so.lm_info->isloader && !skipped_main)
{
- osf_free_so (&so);
+ osf_free_so_local (&so);
skipped_main = 1;
continue;
}
@@ -596,7 +605,7 @@ osf_open_symbol_file_object (void *from_ttyp)
if (!read_map (&ctxt, &so))
break;
found = !so.lm_info->isloader;
- osf_free_so (&so);
+ osf_free_so_local (&so);
}
close_map (&ctxt);
More information about the Gdb-patches
mailing list