This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: dwarf2 loclist question
- From: Josef Zlomek <zlomj9am at artax dot karlin dot mff dot cuni dot cz>
- To: "Dhananjay R. Deshpande" <dhananjayd at KPITCummins dot com>
- Cc: gcc at gcc dot gnu dot org, Daniel Jacobowitz <drow at false dot org>
- Date: Mon, 5 Apr 2004 07:36:03 +0200
- Subject: Re: dwarf2 loclist question
- References: <69595093233BB547BB70CF5E492B63F204D2BD55@sohm.kpit.com>
> > Is not return address supposed to be at the same offset from
> > frame base or in
> > the same register in the whole function?
>
> No, its not always true. For example, in case of SH, initial return address is
> in PR and for non-leaf functions, PR is saved on stack. With simple location
> description, only one of the above can be used. If return address location on
> stack is used for DW_AT_return_addr then backtrace fails when program counter
> is at function entry.
I see.
The original location of return address and the new locations need to be marked
so that variable tracking could generate the location list. I'll investigate
how this can be done. It will also need some tweak to var-tracking.
But generally it should be possible to use var-tracking to generate the location
list for return address.
> For CPUs which don't have return address register, the offset is different at
> function entry and after prologue.
But the offset to frame base is constant. Changes of stack pointer are described
in location list.
Josef