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-30 13:11:52 +02:00
parent 170c3b942c
commit 7051cf9b48
5 changed files with 41 additions and 1 deletions

View File

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

View File

@ -98,3 +98,4 @@
%patch098 -p1
%patch099 -p1
%patch100 -p1
%patch101 -p1

View File

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

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: 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"),

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