From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7947 invoked by alias); 14 Oct 2008 13:31:57 -0000 Received: (qmail 7935 invoked by uid 22791); 14 Oct 2008 13:31:56 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 14 Oct 2008 13:31:16 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 5FCCC106D8; Tue, 14 Oct 2008 13:31:14 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 4CE46106D7; Tue, 14 Oct 2008 13:31:14 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KpjzV-00030W-Mx; Tue, 14 Oct 2008 09:31:13 -0400 Date: Tue, 14 Oct 2008 13:31:00 -0000 From: Daniel Jacobowitz To: Antony KING Cc: gdb@sourceware.org Subject: Re: Strange effect in GDB 6.8 when setting breakpoint on symbol with both strong and weak definitions Message-ID: <20081014133113.GA11370@caradoc.them.org> Mail-Followup-To: Antony KING , gdb@sourceware.org References: <48F49D68.2030701@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48F49D68.2030701@st.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes 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: 2008-10/txt/msg00059.txt.bz2 On Tue, Oct 14, 2008 at 02:23:52PM +0100, Antony KING wrote: > As you can see the location of the breakpoint at f() has been shifted > from its definition in b.c (which is what I expected) before the program > is run, to its definition in a.c after the program stopped in main() > (which is not what I would expect). This shift of location seems wrong > to me and quite unexpected. Is this a bug ? I don't know why this happens. > Another problem is that although there are 2 definitions of f() in the > program, only 1 breakpoint is being set. My understanding is that GDB > should set multiple breakpoints on f(). Is this correct (or is this only > a feature that is enabled when debugging C++ applications) ? It would be nice if this worked, but it doesn't; so far it's only based on line number. So it works for inlined or templated code. -- Daniel Jacobowitz CodeSourcery