From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8562 invoked by alias); 12 Mar 2007 03:35:39 -0000 Received: (qmail 8551 invoked by uid 22791); 12 Mar 2007 03:35:38 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 12 Mar 2007 03:35:32 +0000 Received: from dsl093-172-095.pit1.dsl.speakeasy.net ([66.93.172.95] helo=caradoc.them.org) by nevyn.them.org with esmtp (Exim 4.63) (envelope-from ) id 1HQbJp-0008Lc-QV; Sun, 11 Mar 2007 23:35:29 -0400 Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HQbJp-0000Lr-KN; Sun, 11 Mar 2007 23:35:29 -0400 Date: Mon, 12 Mar 2007 03:35:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Differentiate empty vs. opaque types Message-ID: <20070312033529.GA1116@caradoc.them.org> Mail-Followup-To: Jan Kratochvil , gdb-patches@sourceware.org References: <20070311225518.GA10039@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070311225518.GA10039@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes 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: 2007-03/txt/msg00120.txt.bz2 On Sun, Mar 11, 2007 at 11:55:19PM +0100, Jan Kratochvil wrote: > Hi, > > attached testcase targets the difference of `struct x;' vs. `struct {} x;' by checking > the DWARF flag `DW_AT_declaration': > # DWARF3: An incomplete structure, union or class type is represented by > # a structure, union or class entry that does not have a byte size attribute > # and that has a DW_AT_declaration attribute. > > The attachment then fixes GDB to make the testcase pass. Does this happen in HEAD? It sounds just like the problem Joel fixed for Ada: 2007-01-05 Joel Brobecker * dwarf2read.c (partial_die_info): Add field has_byte_size. (add_partial_symbol): Correct identification of external references. (process_structure_scope): Likewise. (read_partial_die): Handle DW_AT_byte_size attribute. There's an Ada testcase for this, and it passes now. > Patch goes the regression-safe way by introducing OBJF_HAVE_TYPE_STUB currently > being set only by DWARF/DWARF2. An objfile flag is usually not right - this is per-compilation-unit, not per objfile. -- Daniel Jacobowitz CodeSourcery