aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-09-13 00:00:32 +0000
committerJim Blandy <jimb@codesourcery.com>2003-09-13 00:00:32 +0000
commit2a13f9bcb4aac7956a16fb12f2557453aa129ae7 (patch)
tree30c1798010cacac67e90f9cc5db7a038cf5c65ac /gdb/dbxread.c
parenteddbf8500e14407f428cc8a0c6514c56a069a7dd (diff)
downloadgdb-2a13f9bcb4aac7956a16fb12f2557453aa129ae7.zip
gdb-2a13f9bcb4aac7956a16fb12f2557453aa129ae7.tar.gz
gdb-2a13f9bcb4aac7956a16fb12f2557453aa129ae7.tar.bz2
* 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.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 5720130..8bfaf1c 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -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++)