From 0713bd2398e7933637fac3bfdc580fe681ef9657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Sun, 26 Sep 2021 23:49:29 +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 0b2200f..d975b3c 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -372,3 +372,7 @@ Patch089: gdb-rhbz1916516-pathstuff.cc132-internal-error.patch #(Tom de Vries) Patch090: gdb-rhbz1970741-early-exit-for-empty-debuginfod-url.patch +#Backport upstream patch which fixes internal-error: Unexpected +# type field location kind (RHBZ 1976887). +Patch091: gdb-rhbz1976887-field-location-kind.patch + diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index 3f40bb5..ad51f50 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -88,3 +88,4 @@ %patch088 -p1 %patch089 -p1 %patch090 -p1 +%patch091 -p1 diff --git a/_patch_order b/_patch_order index d0e201a..f0e152e 100644 --- a/_patch_order +++ b/_patch_order @@ -88,3 +88,4 @@ gdb-gdb27743-psymtab-imported-unit.patch gdb-dont-overwrite-fsgsbase-m32.patch gdb-rhbz1916516-pathstuff.cc132-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..6638438 --- /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: Sun, 26 Sep 2021 23:39:22 +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 76baf87..b4b7bbb 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: 2%{?dist} +Release: 3%{?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. @@ -1148,6 +1148,10 @@ fi %endif %changelog +* Fri Sep 24 2021 Alexandra Hájková - 10.2-3 +- Backport upstream patch which fixes internal-error: Unexpected + type field location kind (RHBZ 1976887, Alexandra Hájková). + * Thu Sep 23 2021 Bruno Larsen - 10.2-2 - Backport "[gdb] Improve early exits for env var in debuginfod-support.c" (Tom de Vries)