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