* dbxread.c (read_dbx_symtab): Don't report an internal error if
authorJim Blandy <jimb@codesourcery.com>
Sat, 13 Sep 2003 00:17:36 +0000 (00:17 +0000)
committerJim Blandy <jimb@codesourcery.com>
Sat, 13 Sep 2003 00:17:36 +0000 (00:17 +0000)
the file has no .data, .bss, or .rodata sections.  Instead wait
until we see a variable alleged to live in one of those sections.

gdb/ChangeLog
gdb/dbxread.c

index 2f470b8ddbe7f2a0fd6df9502d2df8b172e98a3e..48e36c9c0c09f47dcbde1868463ba030e41d32f1 100644 (file)
@@ -1,5 +1,9 @@
 2003-09-12  Jim Blandy  <jimb@redhat.com>
 
+       * dbxread.c (read_dbx_symtab): Don't report an internal error if
+       the file has no .data, .bss, or .rodata sections.  Instead wait
+       until we see a variable alleged to live in one of those sections.
+
        * 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.
index 8bfaf1c8e91456f695e10db799145f4a646d6a84..d58fc5b2ebe8fe966c1c7d3cd0cc02ac0d7ac8d8 100644 (file)
@@ -1382,7 +1382,12 @@ read_dbx_symtab (struct objfile *objfile)
     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);
+
+  /* If data_sect_index is still -1, that's okay.  It's perfectly fine
+     for the file to have no .data, no .bss, and no .text at all, if
+     it also has no global or static variables.  If it does, we will
+     get an internal error from an ANOFFSET macro below when we try to
+     use data_sect_index.  */
 
   for (symnum = 0; symnum < DBX_SYMCOUNT (objfile); symnum++)
     {
This page took 0.031677 seconds and 4 git commands to generate.