aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cp-namespace.c')
-rw-r--r--gdb/cp-namespace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 016a42f..f34e383 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -206,10 +206,13 @@ cp_lookup_bare_symbol (const struct language_defn *langdef,
struct block_symbol lang_this;
struct type *type;
- lang_this = lookup_language_this (language_def (language_cplus), block);
+ if (langdef != NULL)
+ lang_this = lookup_language_this (langdef, block);
+
if (lang_this.symbol == NULL)
return null_block_symbol;
+
type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (lang_this.symbol)));
/* If TYPE_NAME is NULL, abandon trying to find this symbol.
This can happen for lambda functions compiled with clang++,