diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-06 23:09:53 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-06 23:09:53 +0000 |
commit | d8a66e60cd8468ed1a4cde59963cbe62a5e50da4 (patch) | |
tree | 0d6a4ab7c2151a483e614f326ec5ea587b02e3c8 /gdb | |
parent | 6f56c941ee97a935aa28b24b605e543553e46825 (diff) | |
download | gdb-d8a66e60cd8468ed1a4cde59963cbe62a5e50da4.zip gdb-d8a66e60cd8468ed1a4cde59963cbe62a5e50da4.tar.gz gdb-d8a66e60cd8468ed1a4cde59963cbe62a5e50da4.tar.bz2 |
* symtab.c (lookup_symbol): Don't try adding .c to the name.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/symtab.c | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7b347bd..9aa3bb6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ Thu Jan 6 07:17:53 1994 Jim Kingdon (kingdon@deneb.cygnus.com) + * symtab.c (lookup_symbol): Don't try adding .c to the name. + * remote-bug.c: At the start of each section, reset srec_frame back to 160. diff --git a/gdb/symtab.c b/gdb/symtab.c index 47a85da..cf948aa 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -193,6 +193,10 @@ lookup_symtab (name) s = lookup_symtab_1 (name); if (s) return s; +#if 0 + /* This screws c-exp.y:yylex if there is both a type "tree" and a symtab + "tree.c". */ + /* If name not found as specified, see if adding ".c" helps. */ /* Why is this? Is it just a user convenience? (If so, it's pretty questionable in the presence of C++, FORTRAN, etc.). It's not in @@ -203,6 +207,7 @@ lookup_symtab (name) strcat (copy, ".c"); s = lookup_symtab_1 (copy); if (s) return s; +#endif /* 0 */ /* We didn't find anything; die. */ return 0; @@ -420,6 +425,21 @@ find_pc_psymbol (psymtab, pc) best_pc = psymtab->textlow - 1; + /* Search the global symbols as well as the static symbols, so that + find_pc_partial_function doesn't use a minimal symbol and thus + cache a bad endaddr. */ + for (p = psymtab->objfile->global_psymbols.list + psymtab->globals_offset; + (p - (psymtab->objfile->global_psymbols.list + psymtab->globals_offset) + < psymtab->n_global_syms); + p++) + if (SYMBOL_NAMESPACE (p) == VAR_NAMESPACE + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && SYMBOL_VALUE_ADDRESS (p) > best_pc) + { + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } for (p = psymtab->objfile->static_psymbols.list + psymtab->statics_offset; (p - (psymtab->objfile->static_psymbols.list + psymtab->statics_offset) < psymtab->n_static_syms); |