mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
Remove search_parents parameter from d_lookup_symbol_imports.
gdb/ChangeLog: * d-namespace.c (d_lookup_symbol_imports): Remove argument 'search_parents'. All callers updated.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2016-02-21 Iain Buclaw <ibuclaw@gdcproject.org>
|
||||||
|
|
||||||
|
* d-namespace.c (d_lookup_symbol_imports): Remove argument
|
||||||
|
'search_parents'. All callers updated.
|
||||||
|
|
||||||
2016-02-18 Marcin Kościelnicki <koriakin@0x04.net>
|
2016-02-18 Marcin Kościelnicki <koriakin@0x04.net>
|
||||||
|
|
||||||
* s390-linux-tdep.c (s390_guess_tracepoint_registers): New function.
|
* s390-linux-tdep.c (s390_guess_tracepoint_registers): New function.
|
||||||
|
@ -388,31 +388,15 @@ reset_directive_searched (void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Search for NAME by applying all import statements belonging to
|
/* Search for NAME by applying all import statements belonging to
|
||||||
BLOCK which are applicable in SCOPE.
|
BLOCK which are applicable in SCOPE. */
|
||||||
|
|
||||||
If SEARCH_PARENTS the search will include imports which are
|
|
||||||
applicable in parents of SCOPE.
|
|
||||||
Example:
|
|
||||||
|
|
||||||
module A;
|
|
||||||
import X;
|
|
||||||
void B() {
|
|
||||||
import Y;
|
|
||||||
}
|
|
||||||
|
|
||||||
If SCOPE is "A.B" and SEARCH_PARENTS is true, the imports of
|
|
||||||
modules X and Y will be considered. If SEARCH_PARENTS is false
|
|
||||||
only the import of Y is considered. */
|
|
||||||
|
|
||||||
static struct block_symbol
|
static struct block_symbol
|
||||||
d_lookup_symbol_imports (const char *scope, const char *name,
|
d_lookup_symbol_imports (const char *scope, const char *name,
|
||||||
const struct block *block,
|
const struct block *block,
|
||||||
const domain_enum domain,
|
const domain_enum domain)
|
||||||
const int search_parents)
|
|
||||||
{
|
{
|
||||||
struct using_direct *current;
|
struct using_direct *current;
|
||||||
struct block_symbol sym;
|
struct block_symbol sym;
|
||||||
int directive_match;
|
|
||||||
struct cleanup *searched_cleanup;
|
struct cleanup *searched_cleanup;
|
||||||
|
|
||||||
/* First, try to find the symbol in the given module. */
|
/* First, try to find the symbol in the given module. */
|
||||||
@ -430,18 +414,9 @@ d_lookup_symbol_imports (const char *scope, const char *name,
|
|||||||
current = current->next)
|
current = current->next)
|
||||||
{
|
{
|
||||||
const char **excludep;
|
const char **excludep;
|
||||||
int len = strlen (current->import_dest);
|
|
||||||
|
|
||||||
directive_match = (search_parents
|
/* If the import destination is the current scope then search it. */
|
||||||
? (strncmp (scope, current->import_dest, len) == 0
|
if (!current->searched && strcmp (scope, current->import_dest) == 0)
|
||||||
&& (len == 0
|
|
||||||
|| scope[len] == '.'
|
|
||||||
|| scope[len] == '\0'))
|
|
||||||
: strcmp (scope, current->import_dest) == 0);
|
|
||||||
|
|
||||||
/* If the import destination is the current scope or one of its
|
|
||||||
ancestors then it is applicable. */
|
|
||||||
if (directive_match && !current->searched)
|
|
||||||
{
|
{
|
||||||
/* Mark this import as searched so that the recursive call
|
/* Mark this import as searched so that the recursive call
|
||||||
does not search it again. */
|
does not search it again. */
|
||||||
@ -554,7 +529,7 @@ d_lookup_symbol_module (const char *scope, const char *name,
|
|||||||
blocks. */
|
blocks. */
|
||||||
while (block != NULL)
|
while (block != NULL)
|
||||||
{
|
{
|
||||||
sym = d_lookup_symbol_imports (scope, name, block, domain, 1);
|
sym = d_lookup_symbol_imports (scope, name, block, domain);
|
||||||
|
|
||||||
if (sym.symbol != NULL)
|
if (sym.symbol != NULL)
|
||||||
return sym;
|
return sym;
|
||||||
|
Reference in New Issue
Block a user