Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: tolerate files with no .data, .bss, or .rodata
@ 2003-09-13  0:17 Jim Blandy
  0 siblings, 0 replies; only message in thread
From: Jim Blandy @ 2003-09-13  0:17 UTC (permalink / raw)
  To: gdb-patches


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.

Index: gdb/dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.53
diff -c -r1.53 dbxread.c
*** gdb/dbxread.c	13 Sep 2003 00:00:32 -0000	1.53
--- gdb/dbxread.c	13 Sep 2003 00:06:12 -0000
***************
*** 1382,1388 ****
      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++)
      {
--- 1382,1393 ----
      data_sect_index = SECT_OFF_BSS (objfile);
    if (data_sect_index == -1)
      data_sect_index = SECT_OFF_RODATA (objfile);
! 
!   /* 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++)
      {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-13  0:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-13  0:17 PATCH: tolerate files with no .data, .bss, or .rodata Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox