diff options
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/symfile.c | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fce2a03..5f49542 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-02-28 Tom de Vries <tdevries@suse.de> + + * symfile.c (set_initial_language): Use default language for lookup. + 2020-02-28 Simon Marchi <simon.marchi@efficios.com> * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove diff --git a/gdb/symfile.c b/gdb/symfile.c index f1edf2d..01c3f5a 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1684,11 +1684,15 @@ set_initial_language (void) if (language_mode == language_mode_manual) return; enum language lang = main_language (); + /* Make C the default language. */ + enum language default_lang = language_c; if (lang == language_unknown) { const char *name = main_name (); - struct symbol *sym = lookup_symbol (name, NULL, VAR_DOMAIN, NULL).symbol; + struct symbol *sym + = lookup_symbol_in_language (name, NULL, VAR_DOMAIN, default_lang, + NULL).symbol; if (sym != NULL) lang = sym->language (); @@ -1696,8 +1700,7 @@ set_initial_language (void) if (lang == language_unknown) { - /* Make C the default language */ - lang = language_c; + lang = default_lang; } set_language (lang); |