This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: fall back to rodata section's offset if no .data or .bss
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 12 Sep 2003 19:03:17 -0500
- Subject: PATCH: fall back to rodata section's offset if no .data or .bss
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.
Index: gdb/dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.52
diff -c -r1.52 dbxread.c
*** gdb/dbxread.c 12 Sep 2003 23:34:55 -0000 1.52
--- gdb/dbxread.c 12 Sep 2003 23:35:58 -0000
***************
*** 1380,1385 ****
--- 1380,1387 ----
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++)