Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Spen <spencer.oliver@virgin.net>
Cc: gdb@sources.redhat.com
Subject: Re: Breakpoint function address
Date: Thu, 23 Aug 2007 11:46:00 -0000	[thread overview]
Message-ID: <20070823114620.GA27318@caradoc.them.org> (raw)
In-Reply-To: <466CB20700522961@n066.sc1.he.tucows.com>

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


  reply	other threads:[~2007-08-23 11:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21 14:00 Spen
2007-08-21 14:10 ` Daniel Jacobowitz
2007-08-21 14:25   ` Spen
2007-08-21 14:27     ` Daniel Jacobowitz
2007-08-21 19:14 ` Daniel Jacobowitz
2007-08-22  9:49   ` Spen
2007-08-22 11:10     ` Daniel Jacobowitz
2007-08-23  8:46       ` Spen
2007-08-23 11:46         ` Daniel Jacobowitz [this message]
2007-08-23 14:32           ` Spen

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=20070823114620.GA27318@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=spencer.oliver@virgin.net \
    /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