Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: James Bowman <james.bowman@ftdichip.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Relaxations vs debug info
Date: Wed, 15 Mar 2017 00:04:00 -0000	[thread overview]
Message-ID: <2BB0A51F073B384698CACFD1D5A30FCC24F429@glaexch3> (raw)

I am working on some linker relaxations for my target, using existing 
relaxation implementations as my pattern.

Everything seems to be working: relaxations are being applied, for example
relaxation reduces the size of function foo from 0x48 to 0x38 bytes. 
Checking symbols, it looks good:

    $ ft32-elf-objdump -t a.out  | grep foo
    0000033c g     F .text  00000038 foo

However when I look at the debug info (objdump -g) I see that the size is still 0x48:

    <a1d>   DW_AT_name        : foo
    <a21>   DW_AT_decl_file   : 1
    <a22>   DW_AT_decl_line   : 51
    <a23>   DW_AT_prototyped  : 1
    <a23>   DW_AT_type        : <0x5d>
    <a27>   DW_AT_low_pc      : 0x33c
    <a2b>   DW_AT_high_pc     : 0x48
    
Unsurprisingly this confuses gdb.

My question is: in relaxation, how does the gdb info get adjusted? 


             reply	other threads:[~2017-03-15  0:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15  0:04 James Bowman [this message]
2017-03-15  5:55 ` Senthil Kumar Selvaraj

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=2BB0A51F073B384698CACFD1D5A30FCC24F429@glaexch3 \
    --to=james.bowman@ftdichip.com \
    --cc=gdb@sourceware.org \
    /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