From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24441 invoked by alias); 15 Mar 2002 05:03:58 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 24350 invoked from network); 15 Mar 2002 05:03:56 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 15 Mar 2002 05:03:56 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 16ljsu-0006Gc-00; Fri, 15 Mar 2002 00:04:08 -0500 Date: Thu, 14 Mar 2002 21:03:00 -0000 From: Daniel Jacobowitz To: Zack Weinberg Cc: gdb@sources.redhat.com Subject: Re: Suggestion: Detect inconsistent structure definitions Message-ID: <20020315000408.B23867@nevyn.them.org> Mail-Followup-To: Zack Weinberg , gdb@sources.redhat.com References: <20020313182221.GE8197@codesourcery.com> <20020313190708.B26841@nevyn.them.org> <20020314191337.GF19703@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020314191337.GF19703@codesourcery.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-03/txt/msg00136.txt.bz2 On Thu, Mar 14, 2002 at 11:13:37AM -0800, Zack Weinberg wrote: > On Wed, Mar 13, 2002 at 07:07:08PM -0500, Daniel Jacobowitz wrote: > > > > ... When do we have enough information to know that two references > > are 'supposed' to be of the same type, rather than an > > implementation-private type? And in stabs, at least, no debug > > information appears to be emitted for 'extern' statements, so we > > don't know if a file referenced the type it had a different > > definition of or not. > > I would argue that this situation is rare, and that most programmers > are unlikely to think of incompatible structure definitions as the > cause of a bug. Therefore, how about a warning issued by default when > the object file is read, but with a way to shut it up per-structure in > .gdbinit? I would wager a guess that this occurs at least once or twice in glibc, somewhere. Or in some other system's system libraries. Or in the application package some hundred graphics applications are using. Or something along those lines. In any case, PR filed, hopefully someone will have time and look at it soon. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer