Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Kris Warkentin" <kewarken@qnx.com>
To: "Daniel Jacobowitz" <drow@mvista.com>
Cc: <gdb@sources.redhat.com>, "Zack Weinberg" <zack@codesourcery.com>
Subject: Re: Suggestion: Detect inconsistent structure definitions
Date: Thu, 14 Mar 2002 05:14:00 -0000	[thread overview]
Message-ID: <112d01c1cb5a$3f2f6390$b6010c0a@catdog> (raw)
In-Reply-To: <20020313190210.A26841@nevyn.them.org>

----- Original Message -----
From: "Daniel Jacobowitz" <drow@mvista.com>
To: "Kris Warkentin" <kewarken@qnx.com>
Cc: <gdb@sources.redhat.com>; "Zack Weinberg" <zack@codesourcery.com>
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
>


  reply	other threads:[~2002-03-14 13:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-13 10:22 Zack Weinberg
2002-03-13 10:40 ` Kris Warkentin
2002-03-13 16:02   ` Daniel Jacobowitz
2002-03-14  5:14     ` Kris Warkentin [this message]
2002-03-13 16:07 ` Daniel Jacobowitz
2002-03-14 11:13   ` Zack Weinberg
2002-03-14 21:03     ` Daniel Jacobowitz
2002-03-14 22:11       ` Andrew Cagney
     [not found] ` <mailpost.1016043761.7328@news-sj1-1>
2002-03-13 18:35   ` cgd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='112d01c1cb5a$3f2f6390$b6010c0a@catdog' \
    --to=kewarken@qnx.com \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=zack@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox