[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Frame Layout, Stack Layout
From: |
Josef Eisl |
Subject: |
Re: [avr-gcc-list] Frame Layout, Stack Layout |
Date: |
Wed, 18 Mar 2009 19:17:17 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
Joerg Wunsch wrote:
> Josef Eisl <address@hidden> wrote:
>
>> - In which order is the return address saved on the stack?
>
> This is the area where the AVR is big-endian (as Georg-Johann already
> mentioned). To add to the confusion, the saved address could have
> bits set that are not part of the PC on that device, making it really
> hard to spot when looking at a stack dump. This is e.g. known for the
> ATmega16.
>
> Keep in mind that the return address is stored on the stack as a word
> address, while the GNU tools use byte addressing for everything.
>
My thanks to both of you. It is hard to figure these things out since
understanding a stack dump is more difficult than reading a assembler
listing.
Thanks again!
Josef