summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-09-12 22:49:25 +0000
committerJim Blandy <jimb@codesourcery.com>2003-09-12 22:49:25 +0000
commit14f751370b30213bcbeb016c1737fa6bc1b11456 (patch)
treef36af761a22e7f1dc7486553c7d5e8a6f06dc298
parent93938d4744f78ddb388e2ede70fee0575fe94cb6 (diff)
downloadbinutils-gdb-14f751370b30213bcbeb016c1737fa6bc1b11456.tar.gz
* dbxread.c (read_dbx_symtab): The N_DATA and N_DATA | N_EXT
symbol types are, by definition, in the .data section, so it is correct to use SECT_OFF_DATA (objfile) here, not data_sect_index. If there is no .data section, there should be no N_DATA or N_DATA | N_EXT symbols.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/dbxread.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 90eefe0c6f6..0060e87e798 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2003-09-12 Jim Blandy <jimb@redhat.com>
+
+ * dbxread.c (read_dbx_symtab): The N_DATA and N_DATA | N_EXT
+ symbol types are, by definition, in the .data section, so it is
+ correct to use SECT_OFF_DATA (objfile) here, not data_sect_index.
+ If there is no .data section, there should be no N_DATA or N_DATA
+ | N_EXT symbols.
+
2003-09-12 Mark Kettenis <kettenis@gnu.org>
* amd64fbsd-tdep.c: Fix sigtramp recognition.
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 52cf14987d1..d0b3710c5d8 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1409,7 +1409,7 @@ read_dbx_symtab (struct objfile *objfile)
case N_DATA | N_EXT:
case N_NBDATA | N_EXT:
- nlist.n_value += ANOFFSET (objfile->section_offsets, data_sect_index);
+ nlist.n_value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
goto record_it;
case N_BSS:
@@ -1476,7 +1476,7 @@ read_dbx_symtab (struct objfile *objfile)
continue;
case N_DATA:
- nlist.n_value += ANOFFSET (objfile->section_offsets, data_sect_index);
+ nlist.n_value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
goto record_it;
case N_UNDF | N_EXT: