diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-08-16 19:57:19 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-08-16 19:57:19 +0000 |
commit | 7be570e7ce77920e2e628a03bdfe2d295fc2568f (patch) | |
tree | a49512270bb021f1d5171b362dc973e28c97ca94 /gdb/stabsread.c | |
parent | ed288bb597072176e84fc8279707a3f2f475779b (diff) | |
download | gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.zip gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.tar.gz gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.tar.bz2 |
import gdb-1999-08-16 snapshot
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 52b22f1..98f377a 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -194,6 +194,8 @@ static CORE_ADDR static int resolve_symbol_reference PARAMS ((struct objfile *, struct symbol *, char *)); +void stabsread_clear_cache PARAMS ((void)); + static const char vptr_name[] = {'_', 'v', 'p', 't', 'r', CPLUS_MARKER, '\0'}; static const char vb_name[] = @@ -1192,6 +1194,16 @@ static int ref_count = 0; /* Number of chunks malloced. */ static int ref_chunk = 0; +/* This file maintains a cache of stabs aliases found in the symbol + table. If the symbol table changes, this cache must be cleared + or we are left holding onto data in invalid obstacks. */ +void +stabsread_clear_cache () +{ + ref_count = 0; + ref_chunk = 0; +} + /* Create array of pointers mapping refids to symbols and stab strings. Add pointers to reference definition symbols and/or their values as we find them, using their reference numbers as our index. @@ -4710,7 +4722,7 @@ read_range_type (pp, typenums, objfile) return init_type (TYPE_CODE_INT, -n3, TYPE_FLAG_UNSIGNED, NULL, objfile); - /* Is n3 == 2**(8n))-1 for some integer n? Then it's an + /* Is n3 == 2**(8n)-1 for some integer n? Then it's an unsigned n-byte integer. But do require n to be a power of two; we don't want 3- and 5-byte integers flying around. */ { |