* scripttempl/elfppc.sc: Remove.
[deliverable/binutils-gdb.git] / gdb / irix5-nat.c
index 35445f7bf1d72241567768d440b89a84ef7b8e7c..0c090de6477c14fa509f2534209f360225f9e024 100644 (file)
@@ -278,7 +278,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
 #include "objfiles.h"
 #include "command.h"
 #include "frame.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
 #include "inferior.h"
 #include "language.h"
 #include "gdbcmd.h"
@@ -832,7 +832,9 @@ symbol_add_stub (arg)
 {
   register struct so_list *so = (struct so_list *) arg;                /* catch_errs bogon */
   CORE_ADDR text_addr = 0;
+  struct section_addr_info section_addrs;
 
+  memset (&section_addrs, 0, sizeof (section_addrs));
   if (so->textsection)
     text_addr = so->textsection->addr;
   else if (so->abfd != NULL)
@@ -845,14 +847,14 @@ symbol_add_stub (arg)
       lowest_sect = bfd_get_section_by_name (so->abfd, ".text");
       if (lowest_sect == NULL)
        bfd_map_over_sections (so->abfd, find_lowest_section,
-                              (PTR) & lowest_sect);
+                              (PTR) &lowest_sect);
       if (lowest_sect)
        text_addr = bfd_section_vma (so->abfd, lowest_sect) + LM_OFFSET (so);
     }
 
+  section_addrs.text_addr = text_addr;
   so->objfile = symbol_file_add (so->so_name, so->from_tty,
-                                text_addr,
-                                0, 0, 0, 0, 0);
+                                &section_addrs, 0, 0);
   return (1);
 }
 
@@ -908,37 +910,8 @@ solib_add (arg_string, from_tty, target)
 
       if (count)
        {
-         int update_coreops;
-
-         /* We must update the to_sections field in the core_ops structure
-            here, otherwise we dereference a potential dangling pointer
-            for each call to target_read/write_memory within this routine.  */
-         update_coreops = core_ops.to_sections == target->to_sections;
-
-         /* Reallocate the target's section table including the new size.  */
-         if (target->to_sections)
-           {
-             old = target->to_sections_end - target->to_sections;
-             target->to_sections = (struct section_table *)
-               xrealloc ((char *) target->to_sections,
-                         (sizeof (struct section_table)) * (count + old));
-           }
-         else
-           {
-             old = 0;
-             target->to_sections = (struct section_table *)
-               xmalloc ((sizeof (struct section_table)) * count);
-           }
-         target->to_sections_end = target->to_sections + (count + old);
-
-         /* Update the to_sections field in the core_ops structure
-            if needed.  */
-         if (update_coreops)
-           {
-             core_ops.to_sections = target->to_sections;
-             core_ops.to_sections_end = target->to_sections_end;
-           }
-
+         old = target_resize_to_sections (target, count);
+         
          /* Add these section table entries to the target's table.  */
          while ((so = find_solib (so)) != NULL)
            {
@@ -1010,7 +983,7 @@ info_sharedlibrary_command (ignore, from_tty)
 
   if (exec_bfd == NULL)
     {
-      printf_unfiltered ("No exec file.\n");
+      printf_unfiltered ("No executable file.\n");
       return;
     }
   while ((so = find_solib (so)) != NULL)
@@ -1343,9 +1316,11 @@ must be loaded manually, using `sharedlibrary'.",
 
 static struct core_fns irix5_core_fns =
 {
-  bfd_target_unknown_flavour,
-  fetch_core_registers,
-  NULL
+  bfd_target_unknown_flavour,          /* core_flavour */
+  default_check_format,                        /* check_format */
+  default_core_sniffer,                        /* core_sniffer */
+  fetch_core_registers,                        /* core_read_registers */
+  NULL                                 /* next */
 };
 
 void
This page took 0.02429 seconds and 4 git commands to generate.