RE: [coldfire-gnu-discuss] C Stack Initialization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [coldfire-gnu-discuss] C Stack Initialization
- To: <coldfire-gnu-discuss@xxxxxxxxxxxxxxxx>
- Subject: RE: [coldfire-gnu-discuss] C Stack Initialization
- From: "Corrin Meyer" <Corrin.Meyer@xxxxxxxxxxxxxxx>
- Date: Thu, 4 Sep 2008 08:15:10 -0400
Nathan Sidwell wrote:
>> Is there an easy way using CS3 to have the stack initialized to a
>> predefined bit pattern? By the time main is executed the stack area
has
>> already been used to some degree so starting at __cs3_stack would
likely
>> cause problems. I suppose I can try to determine the current stack
>> pointer once I enter main() by grabbing it from the register or
>> something similar but the stack should really be fully initialized
prior
>> to entering main.
>
>What do you mean by initialize the stack? Do you want a memory
contents on >the
>stack? Where exactly on the stack? What are you trying to do?
I want to have the stack contain a known bit sequence so that I can
periodically check the entire stack to see how much of it has been used
(or at least a reasonable idea) in order to determine what my stack
usage is like (have I run out of stack space, am I low on stack space,
do I have a lot more than I need, etc).
Corrin Meyer