gdb/gdb-bz508406-vla-type-objfi...

19 lines
719 B
Diff

--- ./gdb/gdbtypes.c 2009-08-27 10:33:50.000000000 +0200
+++ ./gdb/gdbtypes.c 2009-08-27 10:32:56.000000000 +0200
@@ -3127,12 +3127,14 @@ copy_type_recursive_1 (struct objfile *o
struct type *new_type;
if (TYPE_OBJFILE (type) == OBJFILE_INTERNAL
- || (objfile == OBJFILE_MALLOC && !TYPE_DYNAMIC (type)))
+ || (TYPE_OBJFILE (type) == OBJFILE_MALLOC && !TYPE_DYNAMIC (type)))
return type;
+#if 0 /* Backward compatibility only. */
/* This type shouldn't be pointing to any types in other objfiles;
if it did, the type might disappear unexpectedly. */
gdb_assert (TYPE_OBJFILE (type) == objfile);
+#endif
pair.old = type;
slot = htab_find_slot (copied_types, &pair, INSERT);