This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[obv] Fix HEAD crashes by me: call ALLOCATE_CPLUS_STRUCT_TYPE


Hi,

this patch of mine checked-in today:
	Re: [patch 2/2] ptype should list also class's typedefs
	http://sourceware.org/ml/gdb-patches/2010-06/msg00601.html

had a bug.  It forgot to call ALLOCATE_CPLUS_STRUCT_TYPE appropriately.
During my regression testing it was not found as:

(a) Generally this functionality requires FSF gcc-4.5+ (or updates-testing
    Fedora gcc-4.4) which I did not have in some roots on my workstation.

(b) Forgotten ALLOCATE_CPLUS_STRUCT_TYPE calls were not much visibly caught
    before another patch of mine got checked-in today:
    	[patch] Fix modification of cplus_struct_default
    	http://sourceware.org/ml/gdb-patches/2010-06/msg00615.html

These two patches and gcc-4.5+ combination crashed many testcases, at least:
	gdb.cp/bs15503.exp

Checked-in as obvious, also to fixup ASAP broken FSF GDB HEAD.


Sorry,
Jan


http://sourceware.org/ml/gdb-cvs/2010-06/msg00201.html

--- src/gdb/ChangeLog	2010/06/28 21:16:01	1.11946
+++ src/gdb/ChangeLog	2010/06/28 22:03:31	1.11947
@@ -1,3 +1,8 @@
+2010-06-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dwarf2read.c (read_structure_type) <fi.typedef_field_list>: Call
+	ALLOCATE_CPLUS_STRUCT_TYPE.
+
 2010-06-28  Phil Muldoon  <pmuldoon@redhat.com>
             Tom Tromey  <tromey@redhat.com>
             Thiago Jung Bauermann  <bauerman@br.ibm.com>
@@ -27,8 +32,6 @@
 	* python/py-inferior.c: New File.
 	* python/py-infthread.c: New File.
 
-
-
 2010-06-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* c-typeprint.c (c_type_print_base): For no fields check include also
--- src/gdb/dwarf2read.c	2010/06/28 20:39:28	1.405
+++ src/gdb/dwarf2read.c	2010/06/28 22:03:31	1.406
@@ -5327,6 +5327,7 @@
 	{
 	  int i = fi.typedef_field_list_count;
 
+	  ALLOCATE_CPLUS_STRUCT_TYPE (type);
 	  TYPE_TYPEDEF_FIELD_ARRAY (type)
 	    = TYPE_ALLOC (type, sizeof (TYPE_TYPEDEF_FIELD (type, 0)) * i);
 	  TYPE_TYPEDEF_FIELD_COUNT (type) = i;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]