public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] gdbtypes.c: Add the case for FIELD_LOC_KIND_DWARF_BLOCK
@ 2021-08-31 20:34 Alexandra Hájková
  2021-08-31 20:34 ` [PATCH 2/2] Test case reproducing PR28030 bug Alexandra Hájková
  2021-09-01 12:59 ` [PATCH 1/2] gdbtypes.c: Add the case for FIELD_LOC_KIND_DWARF_BLOCK Simon Marchi
  0 siblings, 2 replies; 9+ messages in thread
From: Alexandra Hájková @ 2021-08-31 20:34 UTC (permalink / raw)
  To: gdb-patches

From: Alexandra Hájková <ahajkova@redhat.com>

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.26.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-02  6:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 20:34 [PATCH 1/2] gdbtypes.c: Add the case for FIELD_LOC_KIND_DWARF_BLOCK Alexandra Hájková
2021-08-31 20:34 ` [PATCH 2/2] Test case reproducing PR28030 bug Alexandra Hájková
2021-09-01 13:35   ` Simon Marchi
2021-09-01 16:20     ` Kevin Buettner
2021-09-01 16:32       ` Simon Marchi
2021-09-02  6:32         ` Kevin Buettner
2021-09-01 13:37   ` Simon Marchi
2021-09-01 16:22     ` Kevin Buettner
2021-09-01 12:59 ` [PATCH 1/2] gdbtypes.c: Add the case for FIELD_LOC_KIND_DWARF_BLOCK Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).