Blame SOURCES/gdb-rhbz1976887-field-location-kind.patch
|
|
a1b30c |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
a1b30c |
From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova@redhat.com>
|
|
|
a1b30c |
Date: Wed, 29 Sep 2021 10:58:50 +0200
|
|
|
a1b30c |
Subject: gdb-rhbz1976887-field-location-kind.patch
|
|
|
a1b30c |
|
|
|
a1b30c |
;;Backport upstream patch which fixes internal-error: Unexpected
|
|
|
a1b30c |
;;type field location kind (RHBZ 1976887).
|
|
|
a1b30c |
|
|
|
a1b30c |
gdbtypes.c: Add the case for FIELD_LOC_KIND_DWARF_BLOCK
|
|
|
a1b30c |
|
|
|
a1b30c |
The case for FIELD_LOC_KIND_DWARF_BLOCK was missing for
|
|
|
a1b30c |
switch TYPE_FIELD_LOC_KIND. Thas caused an internal-error
|
|
|
a1b30c |
under some circumstances.
|
|
|
a1b30c |
|
|
|
a1b30c |
Fixes bug 28030.
|
|
|
a1b30c |
|
|
|
a1b30c |
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|
|
a1b30c |
--- a/gdb/gdbtypes.c
|
|
|
a1b30c |
+++ b/gdb/gdbtypes.c
|
|
|
a1b30c |
@@ -5571,6 +5571,10 @@ copy_type_recursive (struct objfile *objfile,
|
|
|
a1b30c |
xstrdup (TYPE_FIELD_STATIC_PHYSNAME (type,
|
|
|
a1b30c |
i)));
|
|
|
a1b30c |
break;
|
|
|
a1b30c |
+ case FIELD_LOC_KIND_DWARF_BLOCK:
|
|
|
a1b30c |
+ SET_FIELD_DWARF_BLOCK (new_type->field (i),
|
|
|
a1b30c |
+ TYPE_FIELD_DWARF_BLOCK (type, i));
|
|
|
a1b30c |
+ break;
|
|
|
a1b30c |
default:
|
|
|
a1b30c |
internal_error (__FILE__, __LINE__,
|
|
|
a1b30c |
_("Unexpected type field location kind: %d"),
|