In article <firstname.lastname@example.org>,
> I'm working with an old copy of CodeWarrior (Pro v6) from circa 2000. In the
> process of debugging a crash, I'm seeing a change to a variable that is
> totally unrelated to the variable being changed by the current instruction.
Had that happen to me using Symantec C. It turned out to be the result of
"register colouring" during code optimisation. That is, two variables
were sharing a register because the compiler thought they weren't being
used at the same time. Screwed up the initialisation, though! You could
check the code optimisation options to see if CW has anything like that.
> I would like to know how the variables in my program are actually stored in
> memory. That is say I have the following variables declared:
> short a;
> long b;
> short c;
> long d;
> When the compiler allocates storage for the variables does memory look like:
> something else entirely?
Are these local or global functions? Static? Part of a struct or array?
If they are stored in a data register during execution of the function,
then it would look something like your second option.
> Can I display a memory map of my data section in some way?
It's been a long time, so I'm a little fuzzy on details, but you should
at least be able to see the memory address for each variable along with