From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14054 invoked by alias); 1 Jul 2005 10:13:37 -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 13953 invoked by uid 22791); 1 Jul 2005 10:13:27 -0000 Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.197) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 01 Jul 2005 10:13:27 +0000 Received: by zproxy.gmail.com with SMTP id 13so152708nzp for ; Fri, 01 Jul 2005 03:13:23 -0700 (PDT) Received: by 10.36.222.73 with SMTP id u73mr763870nzg; Fri, 01 Jul 2005 03:13:23 -0700 (PDT) Received: by 10.36.80.10 with HTTP; Fri, 1 Jul 2005 03:13:23 -0700 (PDT) Message-ID: <6f48278f05070103134baa0b90@mail.gmail.com> Date: Fri, 01 Jul 2005 10:13:00 -0000 From: Jie Zhang Reply-To: Jie Zhang To: gdb@sources.redhat.com Subject: A quick question about high/low_pc and linkonce sections Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-SW-Source: 2005-07/txt/msg00000.txt.bz2 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 =3D=3D 0 && (bfd_get_file_flags (obfd) & HAS_RELOC) =3D=3D 0) return 0; Isn't "high =3D=3D 0" much better than "low =3D=3D 0"? It's possible that a valid DW_AT_low_pc is 0. Thanks, Jie