PARAMS removal.
[deliverable/binutils-gdb.git] / gdb / remote-vx.c
index 787bd3924a422203c56e9ff56ac319e6bbf9fb5c..c471373bd585102bbc232b70f74f499fcaf810af 100644 (file)
@@ -22,7 +22,7 @@
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "target.h"
 #include "gdbcore.h"
 #include "command.h"
@@ -651,8 +651,7 @@ vx_mourn_inferior ()
 }
 \f
 
-static void vx_add_symbols PARAMS ((char *, int, CORE_ADDR, CORE_ADDR,
-                                   CORE_ADDR));
+static void vx_add_symbols (char *, int, CORE_ADDR, CORE_ADDR, CORE_ADDR);
 
 struct find_sect_args
   {
@@ -661,7 +660,7 @@ struct find_sect_args
     CORE_ADDR bss_start;
   };
 
-static void find_sect PARAMS ((bfd *, asection *, void *));
+static void find_sect (bfd *, asection *, void *);
 
 static void
 find_sect (abfd, sect, obj)
@@ -701,19 +700,15 @@ vx_add_symbols (name, from_tty, text_addr, data_addr, bss_addr)
 
   /* It might be nice to suppress the breakpoint_re_set which happens here
      because we are going to do one again after the objfile_relocate.  */
-  objfile = symbol_file_add (name, from_tty, 0, 0, 0, 0, 0, 0);
+  objfile = symbol_file_add (name, from_tty, NULL, 0, 0);
 
   /* This is a (slightly cheesy) way of superceding the old symbols.  A less
      cheesy way would be to find the objfile with the same name and
      free_objfile it.  */
   objfile_to_front (objfile);
 
-  offs = (struct section_offsets *)
-    alloca (sizeof (struct section_offsets)
-           + objfile->num_sections * sizeof (offs->offsets));
-  memcpy (offs, objfile->section_offsets,
-         sizeof (struct section_offsets)
-         + objfile->num_sections * sizeof (offs->offsets));
+  offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+  memcpy (offs, objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
 
   ss.text_start = 0;
   ss.data_start = 0;
@@ -721,9 +716,9 @@ vx_add_symbols (name, from_tty, text_addr, data_addr, bss_addr)
   bfd_map_over_sections (objfile->obfd, find_sect, &ss);
 
   /* Both COFF and b.out frontends use these SECT_OFF_* values.  */
-  ANOFFSET (offs, SECT_OFF_TEXT) = text_addr - ss.text_start;
-  ANOFFSET (offs, SECT_OFF_DATA) = data_addr - ss.data_start;
-  ANOFFSET (offs, SECT_OFF_BSS) = bss_addr - ss.bss_start;
+  ANOFFSET (offs, SECT_OFF_TEXT (so->objfile)) = text_addr - ss.text_start;
+  ANOFFSET (offs, SECT_OFF_DATA (so->objfile)) = data_addr - ss.data_start;
+  ANOFFSET (offs, SECT_OFF_BSS (so->objfile)) = bss_addr - ss.bss_start;
   objfile_relocate (objfile, offs);
 }
 
@@ -1026,8 +1021,8 @@ vx_wait (pid_to_wait_for, status)
          sleep_ms (200);       /* FIXME Don't kill the network too badly */
        }
       else if (pid != inferior_pid)
-       fatal ("Bad pid for debugged task: %s\n",
-              local_hex_string ((unsigned long) pid));
+       internal_error ("Bad pid for debugged task: %s\n",
+                       local_hex_string ((unsigned long) pid));
     }
   while (pid == 0);
 
This page took 0.025653 seconds and 4 git commands to generate.