From 5a20fadc84144c2649f7f7c029f1604f003a3834 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Fri, 2 Jul 2021 15:46:08 +0200 Subject: [PATCH] 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. --- gdb/gdbtypes.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 74ad5d6f7fe..8fbc5d3a80b 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -5579,6 +5579,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"), -- 2.30.2