Backport upstream patch which fixes internal-error: Unexpected

type field location kind (RHBZ 1976887, Alexandra Hájková).
This commit is contained in:
Alexandra Hájková 2021-09-26 23:49:29 +02:00
parent 1f44109aba
commit 0713bd2398
5 changed files with 41 additions and 1 deletions

View File

@ -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

View File

@ -88,3 +88,4 @@
%patch088 -p1
%patch089 -p1
%patch090 -p1
%patch091 -p1

View File

@ -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

View File

@ -0,0 +1,30 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova@redhat.com>
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"),

View File

@ -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á <ahajkova@redhat.com> - 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 <blarsen@redhat.com> - 10.2-2
- Backport "[gdb] Improve early exits for env var in debuginfod-support.c"
(Tom de Vries)