avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Frame Layout, Stack Layout


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Frame Layout, Stack Layout
Date: Wed, 18 Mar 2009 06:16:17 +0100 (MET)

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.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]