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