* elfread.c (elf_symtab_read): Avoid use of SECT_OFF_MAX.
[deliverable/binutils-gdb.git] / gdb / windows-nat.c
index 72e8c3f4c73296c216fd28cfe647809e48532ab7..c6f8f66fd16bcd109f88c2e009cf997a09096e1f 100644 (file)
@@ -842,14 +842,17 @@ solib_symbols_add (char *name, int from_tty, CORE_ADDR load_addr)
   else
     {
       /* Fallback on handling just the .text section. */
-      struct section_addr_info section_addrs;
+      struct section_addr_info *section_addrs;
+      struct cleanup *my_cleanups;
 
-      memset (&section_addrs, 0, sizeof (section_addrs));
+      section_addrs = alloc_section_addr_info (1);
+      my_cleanups = make_cleanup (xfree, section_addrs);
       section_addrs.other[0].name = ".text";
       section_addrs.other[0].addr = load_addr;
 
       result = safe_symbol_file_add (name, from_tty, &section_addrs,
                                     0, OBJF_SHARED);
+      do_cleanups (my_cleanups);
     }
 
   return result;
This page took 0.030891 seconds and 4 git commands to generate.