aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-09-08 15:51:39 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-09-08 15:51:39 +0000
commit9f1e14f4c90eca1708ef02ad5dddcb9c526fb0e3 (patch)
treed9f2b17c77d2daabab413c8265bf05496c744991 /gdb/dbxread.c
parentbf6608851fb4d101087871abe628a2238e424959 (diff)
downloadgdb-9f1e14f4c90eca1708ef02ad5dddcb9c526fb0e3.zip
gdb-9f1e14f4c90eca1708ef02ad5dddcb9c526fb0e3.tar.gz
gdb-9f1e14f4c90eca1708ef02ad5dddcb9c526fb0e3.tar.bz2
* minsyms.c, symtab.h (lookup_next_minimal_symbol): New function.
* dbxread.c (process_one_symbol): Use it.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index cc0c43e..6c93ef4 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1933,12 +1933,17 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
if (m && STREQN (SYMBOL_NAME (m), name, l))
/* last_pc_address was in this function */
valu = SYMBOL_VALUE (m);
- else if (m && STREQN (SYMBOL_NAME (m+1), name, l))
- /* last_pc_address was in last function */
- valu = SYMBOL_VALUE (m+1);
else
- /* Not found - use last_pc_address (for finish_block) */
- valu = last_pc_address;
+ {
+ m = lookup_next_minimal_symbol (last_pc_address);
+ if (m && STREQN (SYMBOL_NAME (m), name, l))
+ /* last_pc_address was in last function */
+ valu = SYMBOL_VALUE (m);
+ else
+ /* Not found.
+ Use last_pc_address (for finish_block). */
+ valu = last_pc_address;
+ }
}
last_pc_address = valu; /* Save for SunOS bug circumcision */