aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/windows-tdep.c')
-rw-r--r--gdb/windows-tdep.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index 3e7e8f8..197d779 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -371,13 +371,11 @@ void
windows_xfer_shared_library (const char* so_name, CORE_ADDR load_addr,
struct gdbarch *gdbarch, struct obstack *obstack)
{
- char *p;
CORE_ADDR text_offset;
obstack_grow_str (obstack, "<library name=\"");
- p = xml_escape_text (so_name);
- obstack_grow_str (obstack, p);
- xfree (p);
+ std::string p = xml_escape_text (so_name);
+ obstack_grow_str (obstack, p.c_str ());
obstack_grow_str (obstack, "\"><segment address=\"");
gdb_bfd_ref_ptr dll (gdb_bfd_open (so_name, gnutarget, -1));
/* The following calls are OK even if dll is NULL.
@@ -479,9 +477,6 @@ windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_solib_ops (gdbarch, &solib_target_so_ops);
}
-/* Provide a prototype to silence -Wmissing-prototypes. */
-extern initialize_file_ftype _initialize_windows_tdep;
-
/* Implementation of `tlb' variable. */
static const struct internalvar_funcs tlb_funcs =