* dbxread.c (read_dbx_symtab): If we have no .data section and no
authorJim Blandy <jimb@codesourcery.com>
Sat, 13 Sep 2003 00:00:32 +0000 (00:00 +0000)
committerJim Blandy <jimb@codesourcery.com>
Sat, 13 Sep 2003 00:00:32 +0000 (00:00 +0000)
.bss section, presume that any variables we find live in the
.rodata section.

gdb/ChangeLog
gdb/dbxread.c

index 17f2be9..2f470b8 100644 (file)
@@ -1,5 +1,9 @@
 2003-09-12  Jim Blandy  <jimb@redhat.com>
 
+       * dbxread.c (read_dbx_symtab): If we have no .data section and no
+       .bss section, presume that any variables we find live in the
+       .rodata section.
+
        * dbxread.c (read_dbx_symtab): Add FIXME about finding section
        offsets for global and static variables.
 
index 5720130..8bfaf1c 100644 (file)
@@ -1380,6 +1380,8 @@ read_dbx_symtab (struct objfile *objfile)
   data_sect_index = objfile->sect_index_data;
   if (data_sect_index == -1)
     data_sect_index = SECT_OFF_BSS (objfile);
+  if (data_sect_index == -1)
+    data_sect_index = SECT_OFF_RODATA (objfile);
   gdb_assert (data_sect_index != -1);
 
   for (symnum = 0; symnum < DBX_SYMCOUNT (objfile); symnum++)