Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jie Zhang <jzhang918@gmail.com>
To: gdb@sources.redhat.com
Subject: A quick question about high/low_pc and linkonce sections
Date: Fri, 01 Jul 2005 10:13:00 -0000	[thread overview]
Message-ID: <6f48278f05070103134baa0b90@mail.gmail.com> (raw)

Hi,

This is a piece of code from dwarf2read.c, near the end of
dwarf2_get_pc_bounds ().

  /* When using the GNU linker, .gnu.linkonce. sections are used to
     eliminate duplicate copies of functions and vtables and such.
     The linker will arbitrarily choose one and discard the others.
     The AT_*_pc values for such functions refer to local labels in
     these sections.  If the section from that file was discarded, the
     labels are not in the output, so the relocs get a value of 0.
     If this is a discarded function, mark the pc bounds as invalid,
     so that GDB will ignore it.  */
  if (low == 0 && (bfd_get_file_flags (obfd) & HAS_RELOC) == 0)
    return 0;


Isn't "high == 0" much better than "low == 0"? It's possible that a
valid DW_AT_low_pc is 0.

Thanks,
Jie


             reply	other threads:[~2005-07-01 10:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-01 10:13 Jie Zhang [this message]
2005-07-01 10:52 ` Vladimir Prus

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=6f48278f05070103134baa0b90@mail.gmail.com \
    --to=jzhang918@gmail.com \
    --cc=gdb@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