diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-08 17:26:31 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-08 17:26:31 +0000 |
commit | 3c7d306488436a011afb3a11e5ff2ef0d771717a (patch) | |
tree | e47f883359e0bf89a5dfce44bbec39d204bd827d /gdb/dbxread.c | |
parent | 9f1e14f4c90eca1708ef02ad5dddcb9c526fb0e3 (diff) | |
download | gdb-3c7d306488436a011afb3a11e5ff2ef0d771717a.zip gdb-3c7d306488436a011afb3a11e5ff2ef0d771717a.tar.gz gdb-3c7d306488436a011afb3a11e5ff2ef0d771717a.tar.bz2 |
Revert previous change. It doesn't work because it neglects to
consider there may be a file compiled without -g screwing things up
(e.g. we are looking for the minimal symbol for "main" and we get the
one for "start" instead).
This is the change I mean:
* 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.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 6c93ef4..cc0c43e 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -1933,17 +1933,12 @@ 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 - { - 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; - } + /* Not found - use last_pc_address (for finish_block) */ + valu = last_pc_address; } last_pc_address = valu; /* Save for SunOS bug circumcision */ |