From 2a13f9bcb4aac7956a16fb12f2557453aa129ae7 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sat, 13 Sep 2003 00:00:32 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 4 ++++ gdb/dbxread.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 17f2be97218..2f470b8ddbe 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2003-09-12 Jim Blandy + * 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. diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 57201307066..8bfaf1c8e91 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++) -- 2.30.2