Remove add_symbols_from_enclosing_procs
I noticed that add_symbols_from_enclosing_procs is empty, and can be removed. The one caller, ada_add_local_symbols, can also be simplified, removing some code that, I think, was an incorrect attempt to handle nested functions.
This commit is contained in:
parent
4d0754c5f5
commit
cd4583499f
1 changed files with 2 additions and 28 deletions
|
@ -4522,19 +4522,6 @@ ada_lookup_simple_minsym (const char *name)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For all subprograms that statically enclose the subprogram of the
|
|
||||||
selected frame, add symbols matching identifier NAME in DOMAIN
|
|
||||||
and their blocks to the list of data in RESULT, as for
|
|
||||||
ada_add_block_symbols (q.v.). If WILD_MATCH_P, treat as NAME
|
|
||||||
with a wildcard prefix. */
|
|
||||||
|
|
||||||
static void
|
|
||||||
add_symbols_from_enclosing_procs (std::vector<struct block_symbol> &result,
|
|
||||||
const lookup_name_info &lookup_name,
|
|
||||||
domain_enum domain)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/* True if TYPE is definitely an artificial type supplied to a symbol
|
/* True if TYPE is definitely an artificial type supplied to a symbol
|
||||||
for which no debugging information was given in the symbol file. */
|
for which no debugging information was given in the symbol file. */
|
||||||
|
|
||||||
|
@ -4937,25 +4924,17 @@ remove_irrelevant_renamings (std::vector<struct block_symbol> *syms,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add to RESULT all symbols from BLOCK (and its super-blocks)
|
/* Add to RESULT all symbols from BLOCK (and its super-blocks)
|
||||||
whose name and domain match NAME and DOMAIN respectively.
|
whose name and domain match LOOKUP_NAME and DOMAIN respectively.
|
||||||
If no match was found, then extend the search to "enclosing"
|
|
||||||
routines (in other words, if we're inside a nested function,
|
|
||||||
search the symbols defined inside the enclosing functions).
|
|
||||||
If WILD_MATCH_P is nonzero, perform the naming matching in
|
|
||||||
"wild" mode (see function "wild_match" for more info).
|
|
||||||
|
|
||||||
Note: This function assumes that RESULT has 0 (zero) element in it. */
|
Note: This function assumes that RESULT is empty. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ada_add_local_symbols (std::vector<struct block_symbol> &result,
|
ada_add_local_symbols (std::vector<struct block_symbol> &result,
|
||||||
const lookup_name_info &lookup_name,
|
const lookup_name_info &lookup_name,
|
||||||
const struct block *block, domain_enum domain)
|
const struct block *block, domain_enum domain)
|
||||||
{
|
{
|
||||||
int block_depth = 0;
|
|
||||||
|
|
||||||
while (block != NULL)
|
while (block != NULL)
|
||||||
{
|
{
|
||||||
block_depth += 1;
|
|
||||||
ada_add_block_symbols (result, block, lookup_name, domain, NULL);
|
ada_add_block_symbols (result, block, lookup_name, domain, NULL);
|
||||||
|
|
||||||
/* If we found a non-function match, assume that's the one. */
|
/* If we found a non-function match, assume that's the one. */
|
||||||
|
@ -4964,11 +4943,6 @@ ada_add_local_symbols (std::vector<struct block_symbol> &result,
|
||||||
|
|
||||||
block = BLOCK_SUPERBLOCK (block);
|
block = BLOCK_SUPERBLOCK (block);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If no luck so far, try to find NAME as a local symbol in some lexically
|
|
||||||
enclosing subprogram. */
|
|
||||||
if (result.empty () && block_depth > 2)
|
|
||||||
add_symbols_from_enclosing_procs (result, lookup_name, domain);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* An object of this type is used as the callback argument when
|
/* An object of this type is used as the callback argument when
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue