mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-24 12:39:59 +00:00
2002-12-05 David Carlton <carlton@math.stanford.edu>
* symtab.c (lookup_symbol_aux_block): New function. (lookup_symbol_aux_local): Move code into lookup_symbol_aux_block.
This commit is contained in:
parent
db1ac78dbe
commit
f61e8913ab
@ -1,3 +1,8 @@
|
||||
2002-12-05 David Carlton <carlton@math.stanford.edu>
|
||||
|
||||
* symtab.c (lookup_symbol_aux_block): New function.
|
||||
(lookup_symbol_aux_local): Move code into lookup_symbol_aux_block.
|
||||
|
||||
2002-12-05 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* gdbarch.sh: Dump the predicate function and macro values.
|
||||
|
34
gdb/symtab.c
34
gdb/symtab.c
@ -89,6 +89,13 @@ static struct symbol *lookup_symbol_aux_local (const char *name,
|
||||
const namespace_enum namespace,
|
||||
struct symtab **symtab);
|
||||
|
||||
static
|
||||
struct symbol *lookup_symbol_aux_block (const char *name,
|
||||
const char *mangled_name,
|
||||
const struct block *block,
|
||||
const namespace_enum namespace,
|
||||
struct symtab **symtab);
|
||||
|
||||
static
|
||||
struct symbol *lookup_symbol_aux_symtabs (int block_index,
|
||||
const char *name,
|
||||
@ -964,13 +971,34 @@ lookup_symbol_aux_local (const char *name, const char *mangled_name,
|
||||
struct symtab **symtab)
|
||||
{
|
||||
struct symbol *sym;
|
||||
|
||||
while (block != 0)
|
||||
{
|
||||
sym = lookup_symbol_aux_block (name, mangled_name, block, namespace,
|
||||
symtab);
|
||||
if (sym != NULL)
|
||||
return sym;
|
||||
block = BLOCK_SUPERBLOCK (block);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Look up a symbol in a block; if found, locate its symtab, fixup the
|
||||
symbol, and set block_found appropriately. */
|
||||
|
||||
static struct symbol *
|
||||
lookup_symbol_aux_block (const char *name, const char *mangled_name,
|
||||
const struct block *block,
|
||||
const namespace_enum namespace,
|
||||
struct symtab **symtab)
|
||||
{
|
||||
struct symbol *sym;
|
||||
struct objfile *objfile = NULL;
|
||||
struct blockvector *bv;
|
||||
struct block *b;
|
||||
struct symtab *s = NULL;
|
||||
|
||||
while (block != 0)
|
||||
{
|
||||
sym = lookup_block_symbol (block, name, mangled_name, namespace);
|
||||
if (sym)
|
||||
{
|
||||
@ -993,8 +1021,6 @@ lookup_symbol_aux_local (const char *name, const char *mangled_name,
|
||||
|
||||
return fixup_symbol_section (sym, objfile);
|
||||
}
|
||||
block = BLOCK_SUPERBLOCK (block);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user