* somsolib.c: Include gdb-stabs.h.
authorJeff Law <law@redhat.com>
Mon, 12 Jun 1995 06:24:20 +0000 (06:24 +0000)
committerJeff Law <law@redhat.com>
Mon, 12 Jun 1995 06:24:20 +0000 (06:24 +0000)
(som_solib_section_offsets): Use SECT_OFF_XXX rather than 0, 1,
etc.  Initialize offsets for RODATA & BSS too.
Remainder of mentor-6302.

gdb/ChangeLog
gdb/somsolib.c

index 72fd7041b1fc0eb9029fb8cf7b4d36b8a3de910d..44b591a3e00c757e2403109f6ba26a3a27d587a2 100644 (file)
@@ -1,3 +1,9 @@
+Mon Jun 12 00:21:59 1995  Jeff Law  (law@snake.cs.utah.edu)
+
+       * somsolib.c: Include gdb-stabs.h.
+       (som_solib_section_offsets): Use SECT_OFF_XXX rather than 0, 1,
+       etc.  Initialize offsets for RODATA & BSS too.
+
 Sat Jun 10 17:59:11 1995  Jeff Law  (law@snake.cs.utah.edu)
 
        * hppa-tdep.c (frame_chain): Try to compensate for incomplete
index 91b0e0ccc09d1160697269e80110cc74b1c02332..199f67cec7633af8c994ab7b4e08ff20c5a09d6e 100644 (file)
@@ -33,6 +33,7 @@ and by Cygnus Support.  */
 #include "symfile.h"
 #include "objfiles.h"
 #include "inferior.h"
+#include "gdb-stabs.h"
 
 /* TODO:
 
@@ -584,8 +585,11 @@ som_solib_section_offsets (objfile, offsets)
          asection *private_section;
 
          /* The text offset is easy.  */
-         ANOFFSET (offsets, 0) = (so_list->som_solib.text_addr
-                                  - so_list->som_solib.text_link_addr);
+         ANOFFSET (offsets, SECT_OFF_TEXT)
+           = (so_list->som_solib.text_addr
+              - so_list->som_solib.text_link_addr);
+         ANOFFSET (offsets, SECT_OFF_RODATA)
+           = ANOFFSET (offsets, SECT_OFF_TEXT);
 
          /* We should look at presumed_dp in the SOM header, but
             that's not easily available.  This should be OK though.  */
@@ -594,11 +598,14 @@ som_solib_section_offsets (objfile, offsets)
          if (!private_section)
            {
              warning ("Unable to find $PRIVATE$ in shared library!");
-             ANOFFSET (offsets, 1) = 0;
+             ANOFFSET (offsets, SECT_OFF_DATA) = 0;
+             ANOFFSET (offsets, SECT_OFF_BSS) = 0;
              return 1;
            }
-         ANOFFSET (offsets, 1) = (so_list->som_solib.data_start
-                                  - private_section->vma);
+         ANOFFSET (offsets, SECT_OFF_DATA)
+           = (so_list->som_solib.data_start - private_section->vma);
+         ANOFFSET (offsets, SECT_OFF_BSS)
+           = ANOFFSET (offsets, SECT_OFF_DATA);
          return 1;
        }
       so_list = so_list->next;