From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6354 invoked by alias); 20 May 2010 23:31:50 -0000 Received: (qmail 6340 invoked by uid 22791); 20 May 2010 23:31:49 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 May 2010 23:31:35 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 68F422BB928; Thu, 20 May 2010 19:31:33 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id f1m26U-sZmZI; Thu, 20 May 2010 19:31:33 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 32E472BB924; Thu, 20 May 2010 19:31:33 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 0FD10F58FA; Thu, 20 May 2010 16:31:31 -0700 (PDT) Date: Thu, 20 May 2010 23:35:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Keith Seitz Subject: Re: [patch] Fix duplicate types for single DIE Message-ID: <20100520233131.GN3019@adacore.com> References: <20100513115029.GA27341@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100513115029.GA27341@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00468.txt.bz2 > Tom Tromey may not agree with new internal_error as expressed in > Re: [patch] Fix dwarf2read to crash again > http://sourceware.org/ml/gdb-patches/2010-04/msg00812.html > I am not sure what are his specific plans; if some TRY_CATCH should be > involved the new internal_error call should OK there. This is a situation where we can recover without much hassle by just allocating a new slot, so I'd just emit a complaint, and allow the user to continue debugging. > 2010-05-13 Jan Kratochvil > > * dwarf2read.c (read_structure_type): Move set_descriptive_type after > set_die_type. > (read_array_type): Remove type initialization. Recheck get_die_type > after initial die_type. Move set_die_type before set_descriptive_type. > (read_set_type): New variable domain_type. Recheck get_die_type after > initial die_type. > (read_tag_pointer_type, read_tag_reference_type): New variable > target_type. Recheck get_die_type after initial die_type. > (read_tag_ptr_to_member_type): Recheck get_die_type after initial > die_type and die_containing_type. > (read_tag_const_type, read_tag_volatile_type, read_subroutine_type): > Recheck get_die_type after initial die_type. > (read_subrange_type): Recheck get_die_type after initial die_type. > Move set_die_type before set_descriptive_type. > (set_die_type): Call internal_error if DIE has some type already set. I skimmed through the patch, and it looks reasonable. But I don't feel comfortable approving it - don't know that file well enough anymore. Sorry. There's something I can seem to be able to understand: Why does set_descriptive_type need to be called after set_die_type? I mean, from a conceptual point of view, it sort of makes sense. But I can't see how in practice changing the call order makes any difference... -- Joel