On Mon, Dec 29, 2014 at 10:20 AM, jon <j...@jonshouse.co.uk> wrote:

On most CPU where the stack works down until it hits the top of the
> variables it is pretty easy to detect.  Just stick a known value at the
> end of the variables and test its value in the main loop to see if it
> overwritten. I have done this many times over the years, also moving the
> value around lets you detect corruption caused by out of bounds array
> references and similar.
>
>
Thank you.  Good to know.

On Mon, Dec 29, 2014 at 10:59 AM, Alan Cox <a...@lxorguk.ukuu.org.uk> wrote:
>
>
> PIC18 can be a bit easier. If he means the internal stack then it's got
> over/underflow bits (see the chip docs). For the external RAM you can put
> guard variables, you can also run it on a good simulator and set
> watchpoints, or on a crap simulator and set the stack to a magic pattern
> (eg 0xA5A5) and look to see how much of the pattern is left.


> Alan


Thank you.  Do you suggest a simulator?  Perhaps you have a favorite good
one and a favorite bad one.  Ethernet emulation would be a plus.
~Joshua
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to