Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Hilfinger@otisco.mckusick.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: don't read coff line number unless we have symbols too
Date: Wed, 26 Jun 2002 12:57:00 -0000	[thread overview]
Message-ID: <npsn394xu0.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <200206241932.MAA19971@otisco.McKusick.COM>


"Paul N. Hilfinger" <hilfingr@otisco.mckusick.com> writes:
> Jim Blandy wrote :
> > 
> > Ping to the COFF maintainer: this patch needs review.
> > 
> > Jim Blandy <jimb@redhat.com> writes:
> > 
> > > 2002-03-06  Jim Blandy  <jimb@redhat.com>
> > > 
> > >     * coffread.c (coff_symfile_read): Don't try to read the line
> > >     number table from disk if the image file doesn't have a symbol
> > >     table; we'll never actually look at the info anyway, and Windows
> > >     ships DLL's with bogus file offsets for the line number data.
> 
> But apparently, on Interix, you can get files with valid line numbers and 
> no symbols when all the .o's come from VC and are linked by ld.  So the 
> line-number info is perhaps not entirely useless.  Is this change a 
> space-saving move, or a fix for a more serious problem?

See the comment from the patch:

!   /* Only read line number information if we have symbols.
! 
!      On Windows NT, some of the system's DLL's have sections with
!      PointerToLinenumbers fields that are non-zero, but point at
!      random places within the image file.  (In the case I found,
!      KERNEL32.DLL's .text section has a line number info pointer that
!      points into the middle of the string `lib\\i386\kernel32.dll'.)
! 
!      However, these DLL's also have no symbols.  The line number
!      tables are meaningless without symbols.  And in fact, GDB never
!      uses the line number information unless there are symbols.  So we
!      can avoid spurious error messages (and maybe run a little
!      faster!) by not even reading the line number table unless we have
!      symbols.  */


  reply	other threads:[~2002-06-26 19:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-24 12:32 Paul N. Hilfinger
2002-06-26 12:57 ` Jim Blandy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-24 19:30 Paul N. Hilfinger
2002-06-25 15:07 ` Jim Blandy
2002-03-06 15:58 Jim Blandy
2002-06-20 11:26 ` Jim Blandy
2002-06-20 11:39   ` Daniel Jacobowitz
2002-06-20 13:47     ` Jim Blandy
2002-06-24  5:57   ` Philippe De Muyter
2002-06-24 12:10     ` Joel Brobecker
2002-06-25 15:03       ` Jim Blandy
2002-06-26  1:03         ` Philippe De Muyter
2002-06-26 11:22           ` Jim Blandy
2002-08-21 22:52             ` Jim Blandy

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=npsn394xu0.fsf@zwingli.cygnus.com \
    --to=jimb@redhat.com \
    --cc=Hilfinger@otisco.mckusick.com \
    --cc=gdb-patches@sources.redhat.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