|
|
689258 |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
689258 |
From: Sergio Durigan Junior <sergiodj@redhat.com>
|
|
|
689258 |
Date: Fri, 11 Jan 2019 11:29:25 -0500
|
|
|
689258 |
Subject:
|
|
|
689258 |
gdb-rhbz1560010-fix-assertion-symbol-language-dict-language-4of5.patch
|
|
|
689258 |
|
|
|
689258 |
;; Fix 'Assertion `SYMBOL_LANGUAGE (sym) == DICT_LANGUAGE (dict)->la_language' failed.'
|
|
|
689258 |
;; Keith Seitz, RHBZ#1560010.
|
|
|
689258 |
|
|
|
689258 |
gdb/23712: Remove dw2_add_symbol_to_list
|
|
|
689258 |
|
|
|
689258 |
Finally, we can remove dw2_add_symbol_to_list since the wrapper function
|
|
|
689258 |
originally introduced to catch this multi-language scenario is no longer
|
|
|
689258 |
needed. With multi-language dictionaries, we can now support adding
|
|
|
689258 |
symbols of multiple languages, negating the need for the assertion
|
|
|
689258 |
entirely.
|
|
|
689258 |
|
|
|
689258 |
This patch should now fix gdb/23712 (and symtab/23010). At least it will
|
|
|
689258 |
if the NULL buildsym_compunit problem doesn't strike first (see gdb/23773).
|
|
|
689258 |
|
|
|
689258 |
gdb/ChangeLog:
|
|
|
689258 |
|
|
|
689258 |
PR gdb/23712
|
|
|
689258 |
PR symtab/23010
|
|
|
689258 |
* dwarf2read.c (dw2_add_symbol_to_list): Remove.
|
|
|
689258 |
(fixup_go_packaging, new_symbol): Use add_symbol_to_list.
|
|
|
689258 |
|
|
|
689258 |
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
|
|
689258 |
--- a/gdb/dwarf2read.c
|
|
|
689258 |
+++ b/gdb/dwarf2read.c
|
|
|
689258 |
@@ -9715,23 +9715,6 @@ compute_delayed_physnames (struct dwarf2_cu *cu)
|
|
|
689258 |
cu->method_list.clear ();
|
|
|
689258 |
}
|
|
|
689258 |
|
|
|
689258 |
-/* A wrapper for add_symbol_to_list to ensure that SYMBOL's language is
|
|
|
689258 |
- the same as all other symbols in LISTHEAD. If a new symbol is added
|
|
|
689258 |
- with a different language, this function asserts. */
|
|
|
689258 |
-
|
|
|
689258 |
-static inline void
|
|
|
689258 |
-dw2_add_symbol_to_list (struct symbol *symbol, struct pending **listhead)
|
|
|
689258 |
-{
|
|
|
689258 |
- /* Only assert if LISTHEAD already contains symbols of a different
|
|
|
689258 |
- language (dict_create_hashed/insert_symbol_hashed requires that all
|
|
|
689258 |
- symbols in this list are of the same language). */
|
|
|
689258 |
- gdb_assert ((*listhead) == NULL
|
|
|
689258 |
- || (SYMBOL_LANGUAGE ((*listhead)->symbol[0])
|
|
|
689258 |
- == SYMBOL_LANGUAGE (symbol)));
|
|
|
689258 |
-
|
|
|
689258 |
- add_symbol_to_list (symbol, listhead);
|
|
|
689258 |
-}
|
|
|
689258 |
-
|
|
|
689258 |
/* Go objects should be embedded in a DW_TAG_module DIE,
|
|
|
689258 |
and it's not clear if/how imported objects will appear.
|
|
|
689258 |
To keep Go support simple until that's worked out,
|
|
|
689258 |
@@ -9803,7 +9786,7 @@ fixup_go_packaging (struct dwarf2_cu *cu)
|
|
|
689258 |
SYMBOL_ACLASS_INDEX (sym) = LOC_TYPEDEF;
|
|
|
689258 |
SYMBOL_TYPE (sym) = type;
|
|
|
689258 |
|
|
|
689258 |
- dw2_add_symbol_to_list (sym, &global_symbols);
|
|
|
689258 |
+ add_symbol_to_list (sym, &global_symbols);
|
|
|
689258 |
|
|
|
689258 |
xfree (package_name);
|
|
|
689258 |
}
|
|
|
689258 |
@@ -21387,7 +21370,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|
|
|
689258 |
SYMBOL_TYPE (sym) = objfile_type (objfile)->builtin_core_addr;
|
|
|
689258 |
SYMBOL_DOMAIN (sym) = LABEL_DOMAIN;
|
|
|
689258 |
SYMBOL_ACLASS_INDEX (sym) = LOC_LABEL;
|
|
|
689258 |
- dw2_add_symbol_to_list (sym, cu->list_in_scope);
|
|
|
689258 |
+ add_symbol_to_list (sym, cu->list_in_scope);
|
|
|
689258 |
break;
|
|
|
689258 |
case DW_TAG_subprogram:
|
|
|
689258 |
/* SYMBOL_BLOCK_VALUE (sym) will be filled in later by
|
|
|
689258 |
@@ -21645,7 +21628,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|
|
|
689258 |
case DW_TAG_common_block:
|
|
|
689258 |
SYMBOL_ACLASS_INDEX (sym) = LOC_COMMON_BLOCK;
|
|
|
689258 |
SYMBOL_DOMAIN (sym) = COMMON_BLOCK_DOMAIN;
|
|
|
689258 |
- dw2_add_symbol_to_list (sym, cu->list_in_scope);
|
|
|
689258 |
+ add_symbol_to_list (sym, cu->list_in_scope);
|
|
|
689258 |
break;
|
|
|
689258 |
default:
|
|
|
689258 |
/* Not a tag we recognize. Hopefully we aren't processing
|
|
|
689258 |
@@ -21665,7 +21648,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|
|
|
689258 |
}
|
|
|
689258 |
|
|
|
689258 |
if (list_to_add != NULL)
|
|
|
689258 |
- dw2_add_symbol_to_list (sym, list_to_add);
|
|
|
689258 |
+ add_symbol_to_list (sym, list_to_add);
|
|
|
689258 |
|
|
|
689258 |
/* For the benefit of old versions of GCC, check for anonymous
|
|
|
689258 |
namespaces based on the demangled name. */
|