From 7051cf9b4860876de1c3a0cb08eb532c4a733e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Thu, 30 Sep 2021 13:11:52 +0200 Subject: [PATCH] =?UTF-8?q?Backport=20upstream=20patch=20which=20fixes=20i?= =?UTF-8?q?nternal-error:=20Unexpected=20type=20field=20location=20kind=20?= =?UTF-8?q?(RHBZ=201976887,=20Alexandra=20H=C3=A1jkov=C3=A1).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _gdb.spec.Patch.include | 4 +++ _gdb.spec.patch.include | 1 + _patch_order | 1 + gdb-rhbz1976887-field-location-kind.patch | 30 +++++++++++++++++++++++ gdb.spec | 6 ++++- 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 gdb-rhbz1976887-field-location-kind.patch diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index f5491b4..f4c56c4 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -411,3 +411,7 @@ Patch099: gdb-rhbz1916516-pathstuffs132-internal-error.patch #(Tom de Vries) Patch100: gdb-rhbz1970741-early-exit-for-empty-debuginfod-url.patch +#Backport upstream patch which fixes internal-error: Unexpected +#type field location kind (RHBZ 1976887). +Patch101: gdb-rhbz1976887-field-location-kind.patch + diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index fd3cf02..202a5cc 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -98,3 +98,4 @@ %patch098 -p1 %patch099 -p1 %patch100 -p1 +%patch101 -p1 diff --git a/_patch_order b/_patch_order index 33496b1..e7c012b 100644 --- a/_patch_order +++ b/_patch_order @@ -98,3 +98,4 @@ gdb-rhbz1971096-glibc2.34-4.patch gdb-rhbz1971096-glibc2.34-5.patch gdb-rhbz1916516-pathstuffs132-internal-error.patch gdb-rhbz1970741-early-exit-for-empty-debuginfod-url.patch +gdb-rhbz1976887-field-location-kind.patch diff --git a/gdb-rhbz1976887-field-location-kind.patch b/gdb-rhbz1976887-field-location-kind.patch new file mode 100644 index 0000000..803b2da --- /dev/null +++ b/gdb-rhbz1976887-field-location-kind.patch @@ -0,0 +1,30 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= +Date: Thu, 30 Sep 2021 13:07:56 +0200 +Subject: gdb-rhbz1976887-field-location-kind.patch + +;;Backport upstream patch which fixes internal-error: Unexpected +;;type field location kind (RHBZ 1976887). + +gdbtypes.c: Add the case for FIELD_LOC_KIND_DWARF_BLOCK + +The case for FIELD_LOC_KIND_DWARF_BLOCK was missing for +switch TYPE_FIELD_LOC_KIND. Thas caused an internal-error +under some circumstances. + +Fixes bug 28030. + +diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c +--- a/gdb/gdbtypes.c ++++ b/gdb/gdbtypes.c +@@ -5434,6 +5434,10 @@ copy_type_recursive (struct objfile *objfile, + xstrdup (TYPE_FIELD_STATIC_PHYSNAME (type, + i))); + break; ++ case FIELD_LOC_KIND_DWARF_BLOCK: ++ SET_FIELD_DWARF_BLOCK (new_type->field (i), ++ TYPE_FIELD_DWARF_BLOCK (type, i)); ++ break; + default: + internal_error (__FILE__, __LINE__, + _("Unexpected type field location kind: %d"), diff --git a/gdb.spec b/gdb.spec index 340e2d5..c94263c 100644 --- a/gdb.spec +++ b/gdb.spec @@ -37,7 +37,7 @@ Version: 10.2 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL # Do not provide URL for snapshots as the file lasts there only for 2 days. @@ -1143,6 +1143,10 @@ fi %endif %changelog +* Thu Sep 30 2021 Alexandra Hájková - 10.2-9 +- Backport upstream patch which fixes internal-error: Unexpected + type field location kind (RHBZ 1976887, Alexandra Hájková). + * Wed Sep 22 2021 Bruno Larsen - 10.2-8 - Backport "[gdb] Improve early exits for env var in debuginfod-support.c" (Tom de Vries)