This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Breakpoint function address


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]