OSDN Git Service

* remote-vx.c (vx_add_symbols): Fix compilation error.
authorbrobecke <brobecke>
Fri, 4 Jul 2003 01:27:25 +0000 (01:27 +0000)
committerbrobecke <brobecke>
Fri, 4 Jul 2003 01:27:25 +0000 (01:27 +0000)
gdb/ChangeLog
gdb/remote-vx.c

index 35a6316..56e2864 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-03  Joel Brobecker  <brobecker@gnat.com>
+
+       * remote-vx.c (vx_add_symbols): Fix compilation error.
+
 2003-07-03  Andrew Cagney  <cagney@redhat.com>
 
        * gdbarch.sh (REGISTER_NAME): Do not supply a default.
index b3fb7f2..d21025c 100644 (file)
@@ -675,8 +675,11 @@ vx_add_symbols (char *name, int from_tty, CORE_ADDR text_addr,
      free_objfile it.  */
   objfile_to_front (objfile);
 
-  offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
-  memcpy (offs, objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
+  offs =
+    (struct section_offsets *)
+    alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
+  memcpy (offs, objfile->section_offsets,
+          SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
 
   ss.text_start = 0;
   ss.data_start = 0;