#include "gdbcmd.h"
#include "elf-bfd.h"
#include "exceptions.h"
+#include "gdb_bfd.h"
#define GOT_MODULE_OFFSET 4
struct int_elf32_dsbt_loadmap *int_ldmbuf;
int version, seg, nsegs;
- int ext_ldmbuf_size, int_ldmbuf_size;
+ int int_ldmbuf_size;
ext_ldmbuf = (struct ext_elf32_dsbt_loadmap *) buf;
unsigned int interp_sect_size;
gdb_byte *buf;
bfd *tmp_bfd = NULL;
- int status;
- CORE_ADDR addr, interp_loadmap_addr;
+ CORE_ADDR addr;
gdb_byte addr_buf[TIC6X_PTR_SIZE];
struct int_elf32_dsbt_loadmap *ldm;
volatile struct gdb_exception ex;
{
warning (_("Could not find symbol _dl_debug_addr in dynamic linker"));
enable_break_failure_warning ();
- bfd_close (tmp_bfd);
+ gdb_bfd_unref (tmp_bfd);
return 0;
}
"(at address %s) from dynamic linker"),
hex_string_custom (addr + 8, 8));
enable_break_failure_warning ();
- bfd_close (tmp_bfd);
+ gdb_bfd_unref (tmp_bfd);
return 0;
}
addr = extract_unsigned_integer (addr_buf, sizeof addr_buf, byte_order);
/* We're done with the temporary bfd. */
- bfd_close (tmp_bfd);
+ gdb_bfd_unref (tmp_bfd);
/* We're also done with the loadmap. */
xfree (ldm);
static void
dsbt_relocate_main_executable (void)
{
- int status;
- CORE_ADDR exec_addr, interp_addr;
struct int_elf32_dsbt_loadmap *ldm;
struct cleanup *old_chain;
struct section_offsets *new_offsets;