From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5772 invoked by alias); 23 Aug 2007 11:46:29 -0000 Received: (qmail 5583 invoked by uid 22791); 23 Aug 2007 11:46:27 -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; Thu, 23 Aug 2007 11:46:25 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id B70FB9810B; Thu, 23 Aug 2007 11:46:24 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 871389810A; Thu, 23 Aug 2007 11:46:24 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1IOB8m-0001MY-TX; Thu, 23 Aug 2007 07:46:21 -0400 Date: Thu, 23 Aug 2007 11:46:00 -0000 From: Daniel Jacobowitz To: Spen Cc: gdb@sources.redhat.com Subject: Re: Breakpoint function address Message-ID: <20070823114620.GA27318@caradoc.them.org> Mail-Followup-To: Spen , gdb@sources.redhat.com References: <20070822111023.GA25071@caradoc.them.org> <466CB20700522961@n066.sc1.he.tucows.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <466CB20700522961@n066.sc1.he.tucows.com> User-Agent: Mutt/1.5.15 (2007-04-09) 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: 2007-08/txt/msg00173.txt.bz2 On Thu, Aug 23, 2007 at 09:48:21AM +0100, Spen wrote: > GNU gdb 6.6.50.20070813-cvs - failed elf I compiled current CVS for arm-elf. I connected to a remote gdbserver - not quite the same but as close as I can manage. I repeated your steps and the breakpoint went to the right location. Then I tried using gdbreplay on your log file. That time I got the bad breakpoint. Your ELF file shows: <1><196f>: Abbrev Number: 19 (DW_TAG_subprogram) <1970> DW_AT_sibling : <1a0f> <1974> DW_AT_external : 1 <1975> DW_AT_name : (indirect string, offset: 0x8f7): VIC_Config <1979> DW_AT_decl_file : 1 <197a> DW_AT_decl_line : 724 <197c> DW_AT_prototyped : 1 <197d> DW_AT_low_pc : 0 <1981> DW_AT_high_pc : 0x3f0 <1985> DW_AT_frame_base : 1 byte block: 5b (DW_OP_reg11) That's interesting because that function does not exist in your file anywhere. You've only got debug info for it. I assume that it was discarded by --gc-sections. This should hopefully tip you off: #0 VIC_Config (VIC_Source=65535, VIC_LineMode=4294967295, VIC_Priority=255 '�') Probably not where you expected to be when you connected to your target. Try building a CVS snapshot of binutils or using the 2.18 prerelease snapshot from two weeks ago, and relinking. I recently changed the way the linker behaves when updating debug info for discarded functions. It will now set the high PC of the function to 0, so we will never decide it is current. -- Daniel Jacobowitz CodeSourcery