From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2791 invoked by alias); 19 Sep 2009 16:34:04 -0000 Received: (qmail 2781 invoked by uid 22791); 19 Sep 2009 16:34:03 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_34,J_CHICKENPOX_44 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 19 Sep 2009 16:33:58 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 77E122BAC4F; Sat, 19 Sep 2009 12:33:57 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DmREo-4Bs+Dh; Sat, 19 Sep 2009 12:33:57 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 303AE2BAC50; Sat, 19 Sep 2009 12:33:56 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id AE715F5935; Sat, 19 Sep 2009 09:33:44 -0700 (PDT) Date: Sat, 19 Sep 2009 16:34:00 -0000 From: Joel Brobecker To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: Symbols/blocks questions Message-ID: <20090919163344.GL7961@adacore.com> References: <200909191552.02677.ghost@cs.msu.su> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909191552.02677.ghost@cs.msu.su> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00234.txt.bz2 > 1. Given 'struct block *b', is it true that > > block_for_pc (b.startaddr) == b My guess is that this is NOT true. Two blocks could have the same start address if one block is nested inside the other... > 2. Uness I am mistaken, in case of lines inside templates, > inline functions, and constructors, decode_line_1 returns > just one sal. (And breakpoint.c explicitly expands thsoe in > expand_line_sal). In what cases will decode_line_1 actually > return multiple sals? For overloaded functions? Anything else? > Would it be sensible, eventually, to make decode_line_1 > return all locations corresponding to file:line? > > 3. The code below, from Apple GDB, first calls decode_line_1 > and then checks, for each sal, if the line passed to decode_line_1 > is less then sal.line. How could this happen at all? I though that > if I ask decode_line_1 for line 10, then either it returns sals > for line 10, or it returns no sal at all. Jerome Guitton had a serious look at how things are done when decoding breakpoint locations, mostly because we wanted Ada and C++ to use the same code for multiple-location breakpoints. I'll ask him to see there is any useful piece of information that might help answer these questions. -- Joel