#include "gdb_obstack.h"
#include "symtab.h"
#include "symfile.h"
-#include "gdb_assert.h"
#include "block.h"
#include "objfiles.h"
#include "gdbtypes.h"
{
struct symbol *sym = NULL;
- sym = lookup_symbol_static (name, block, domain);
+ sym = lookup_symbol_in_static_block (name, block, domain);
if (sym != NULL)
return sym;
}
type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (this)));
+ /* If TYPE_NAME is NULL, abandon trying to find this symbol.
+ This can happen for lambda functions compiled with clang++,
+ which outputs no name for the container class. */
+ if (TYPE_NAME (type) == NULL)
+ return NULL;
klass = xstrdup (TYPE_NAME (type));
nested = xstrdup (name);
}
len = strlen (base_name) + 2 + strlen (name) + 1;
concatenated_name = xrealloc (concatenated_name, len);
xsnprintf (concatenated_name, len, "%s::%s", base_name, name);
- sym = lookup_symbol_static (concatenated_name, block, VAR_DOMAIN);
+ sym = lookup_symbol_in_static_block (concatenated_name, block,
+ VAR_DOMAIN);
if (sym != NULL)
break;
/* Nope. We now have to search all static blocks in all objfiles,
even if block != NULL, because there's no guarantees as to which
symtab the symbol we want is in. */
- sym = lookup_static_symbol_aux (concatenated_name, VAR_DOMAIN);
+ sym = lookup_static_symbol (concatenated_name, VAR_DOMAIN);
if (sym != NULL)
break;
concatenated_name = alloca (size);
xsnprintf (concatenated_name, size, "%s::%s",
parent_name, nested_name);
- sym = lookup_static_symbol_aux (concatenated_name, VAR_DOMAIN);
+ sym = lookup_static_symbol (concatenated_name, VAR_DOMAIN);
if (sym != NULL)
return sym;