From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7797 invoked by alias); 14 Mar 2002 13:14:17 -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 7721 invoked from network); 14 Mar 2002 13:14:12 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 14 Mar 2002 13:14:12 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id IAA16249; Thu, 14 Mar 2002 08:10:10 -0500 Received: from catdog (dhcpa182 [10.12.1.182]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id IAA15461; Thu, 14 Mar 2002 08:12:01 -0500 Message-ID: <112d01c1cb5a$3f2f6390$b6010c0a@catdog> From: "Kris Warkentin" To: "Daniel Jacobowitz" Cc: , "Zack Weinberg" References: <20020313182221.GE8197@codesourcery.com> <106b01c1cabe$a8e520f0$b6010c0a@catdog> <20020313190210.A26841@nevyn.them.org> Subject: Re: Suggestion: Detect inconsistent structure definitions Date: Thu, 14 Mar 2002 05:14:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2002-03/txt/msg00126.txt.bz2 ----- Original Message ----- From: "Daniel Jacobowitz" To: "Kris Warkentin" Cc: ; "Zack Weinberg" Sent: Wednesday, March 13, 2002 7:02 PM Subject: Re: Suggestion: Detect inconsistent structure definitions > On Wed, Mar 13, 2002 at 01:41:16PM -0500, Kris Warkentin wrote: > > Seems to me that the linker should be able to detect this problem as > > well....It uses the debug information for error reporting. The problem here > > No, the linker uses symbol information. It does -not- read debug info. I'm not so sure about that. I remember a problem with gnu ld crashing in the dwarf1 interpretation section of the bfd when it couldn't resolve a symbol. - if you link an app without debug info you will get different error messages from ld than if it does have debug info. You may be right in that it doesn't read the debug info while it's linking - I think it only looks at it if there's an error so that it can print nicer error messages (ie. source file/line # vs. object) > > > is not so much the definitions of the structures but the reference to a > > variable defined in another object which has a different definition. > > That's just a specific case of the problem Zack is describing, really. I spent some time thinking about that and you're right - there's WAY too many ways that a reference to a structure could pass across object boundaries to check for them all. The best we could do is to optionally give warnings if structures of the same name and different format are described in different objects. One would think that, in practice, this wouldn't come up that often and would most likely be a sign of a problem. cheers, Kris > > -- > Daniel Jacobowitz Carnegie Mellon University > MontaVista Software Debian GNU/Linux Developer >