This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Interpreting stack frame
On Mon, Mar 23, 2009 at 5:52 PM, Andrew Haley <aph@redhat.com> wrote:
> Peter Leist wrote:
>>
>> I understand that, but at a given point in the program flow the assignment
>> of stack slot to a variable should be fixed.
>
> Should it? ?We do some very drastic transformations in gcc, sometimes
> coalescing variables, sometimes eliminating them altogether, and
> sometimes creating new ones which have no equivalent in the source.
> This is all business as usual for an optimizing compiler.
Ok, I think I expressed my goals unclear. I do not want to link a slot 1:1
to a source-code variable. It is clear that such a relation does not exist
in an optimized code.
Maybe I have to ask the other way around: How can I find out
which stack slots of the current function may get changed be a called
function. Or in other words: At each call of an other function, I want to
know which stack slots (not variables) are passed as arguments via reference.
>> Every debugger should be able to tell that, or am I wrong? Can I probably
>> extract the information from debug data?
>
> Yes, but as I explain above the information is not going to be complete.
As stated above, I probably don't need complete information.
Peter