Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Orjan Friberg <orjan.friberg@axis.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [CRIS] dwarf2 frame sniffer problem?
Date: Fri, 19 Mar 2004 00:09:00 -0000	[thread overview]
Message-ID: <4051D95F.3000704@axis.com> (raw)
In-Reply-To: <40518F6A.2080806@axis.com>

Orjan Friberg wrote:
> Daniel Jacobowitz wrote:
> 
>>
>> The beauty of using the CFI data is that it _is_ supposed to work in
>> the prologue.  It sounds like the CFI is wrong.  Could you post both
>> assembly and CFI data for the same testcase?  I don't know CRIS
>> assembly but I imagine I can interpret it well enough to see what's
>> going on.

Out of curiosity, I had a look at the calls to execute_cfa_program 
(where the current state of the registers seems to be built from the 
dwarf2 information).  The second call to execute_cfa_program is preceded 
by the comment:

/* Then decode the insns in the FDE up to our target PC.  */

When we get into execute_cfa_program we're stopped at the first 
instruction in foo, and the pc variable in execute_cfa_program is set to 
that value also.  Nevertheless we parse *all* the information in that FDE:

> 00000028 00000014 00000000 FDE cie=00000000 pc=00080080..00080096
>   DW_CFA_advance_loc: 0 to 00080080
>   DW_CFA_def_cfa: r8 ofs 8
>   DW_CFA_offset: r16 at cfa-4
>   DW_CFA_offset: r8 at cfa-8

So, not only do we incorrectly conclude that the SRP is located on the 
stack, but that the frame pointer (r8) is also (though neither of those 
have actually been pushed yet).  Comparing with the example in Appendix 
5 of the dwarf2 spec I get the impression that some DW_CFA_advance_loc 
are missing, but now is probably a good time for me to stop guessing ;-) .

-- 
Orjan Friberg
Axis Communications


WARNING: multiple messages have this Message-ID
From: Orjan Friberg <orjan.friberg@axis.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [CRIS] dwarf2 frame sniffer problem?
Date: Fri, 12 Mar 2004 15:38:00 -0000	[thread overview]
Message-ID: <4051D95F.3000704@axis.com> (raw)
Message-ID: <20040312153800.0qn5j672Xm6KadO9_RaRZRYlNJMlDwTFdldwa8bbSA8@z> (raw)
In-Reply-To: <40518F6A.2080806@axis.com>

Orjan Friberg wrote:
> Daniel Jacobowitz wrote:
> 
>>
>> The beauty of using the CFI data is that it _is_ supposed to work in
>> the prologue.  It sounds like the CFI is wrong.  Could you post both
>> assembly and CFI data for the same testcase?  I don't know CRIS
>> assembly but I imagine I can interpret it well enough to see what's
>> going on.

Out of curiosity, I had a look at the calls to execute_cfa_program 
(where the current state of the registers seems to be built from the 
dwarf2 information).  The second call to execute_cfa_program is preceded 
by the comment:

/* Then decode the insns in the FDE up to our target PC.  */

When we get into execute_cfa_program we're stopped at the first 
instruction in foo, and the pc variable in execute_cfa_program is set to 
that value also.  Nevertheless we parse *all* the information in that FDE:

> 00000028 00000014 00000000 FDE cie=00000000 pc=00080080..00080096
>   DW_CFA_advance_loc: 0 to 00080080
>   DW_CFA_def_cfa: r8 ofs 8
>   DW_CFA_offset: r16 at cfa-4
>   DW_CFA_offset: r8 at cfa-8

So, not only do we incorrectly conclude that the SRP is located on the 
stack, but that the frame pointer (r8) is also (though neither of those 
have actually been pushed yet).  Comparing with the example in Appendix 
5 of the dwarf2 spec I get the impression that some DW_CFA_advance_loc 
are missing, but now is probably a good time for me to stop guessing ;-) .

-- 
Orjan Friberg
Axis Communications


  parent reply	other threads:[~2004-03-12 15:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-10 16:53 Orjan Friberg
2004-03-10 16:59 ` Daniel Jacobowitz
2004-03-19  0:09   ` Orjan Friberg
2004-03-11 14:09     ` Orjan Friberg
2004-03-11 15:55     ` Orjan Friberg
2004-03-11 17:05       ` Andrew Cagney
2004-03-19  0:09         ` Andrew Cagney
2004-03-19  0:09         ` Orjan Friberg
2004-03-12 12:00           ` Orjan Friberg
2004-03-11 17:11       ` Daniel Jacobowitz
2004-03-12 10:23         ` Orjan Friberg
2004-03-19  0:09           ` Daniel Jacobowitz
2004-03-12 15:38             ` Daniel Jacobowitz
2004-03-15 10:19             ` Orjan Friberg
2004-03-19  0:09               ` Orjan Friberg
2004-03-16 16:26             ` Orjan Friberg
2004-03-16 19:13               ` Daniel Jacobowitz
2004-03-16 20:51                 ` Hans-Peter Nilsson
2004-03-16 22:27                   ` Daniel Jacobowitz
2004-03-16 23:38                     ` Hans-Peter Nilsson
2004-03-16 23:58                       ` Daniel Jacobowitz
2004-03-19  0:09                         ` Daniel Jacobowitz
2004-03-19  0:09                       ` Hans-Peter Nilsson
2004-03-19  0:09                     ` Daniel Jacobowitz
2004-03-19  0:09                   ` Hans-Peter Nilsson
2004-03-19  0:09                 ` Daniel Jacobowitz
2004-03-19  0:09               ` Orjan Friberg
2004-03-19  0:09           ` Orjan Friberg
2004-03-19  0:09           ` Orjan Friberg
2004-03-12 13:50             ` Orjan Friberg
2004-03-19  0:09           ` Orjan Friberg [this message]
2004-03-12 15:38             ` Orjan Friberg
2004-03-19  0:09         ` Daniel Jacobowitz
2004-03-19  0:09       ` Orjan Friberg
2004-03-19  0:09   ` Daniel Jacobowitz
2004-03-19  0:09 ` Orjan Friberg

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=4051D95F.3000704@axis.com \
    --to=orjan.friberg@axis.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    /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