public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* stack check support on embedded targets
@ 2001-07-06  9:19 Joel Sherrill
  2001-08-02 10:19 ` machine description problem Olivier Garbil
  0 siblings, 1 reply; 2+ messages in thread
From: Joel Sherrill @ 2001-07-06  9:19 UTC (permalink / raw)
  To: gcc-help

Hi,

I would like to add stack check support for RTEMS tasks/threads.  This is an
run-time environment for embedded CPUs (about a dozen now) without an
MMU.  The generic stack probe code seems to assume that an MMU will
catch an access of an invalid address.  On RTEMS, the test for stack in 
range
is portable and quite simple.  The valid stack range is in the thread 
control block.
So one can write a short portable C routine to catch the fault;

void check_sp( void *sp current_sp );
  if current_sp is NOT in range
    ERROR

Any thoughts on how to generically add support for calling a probe routine
with the current stack pointer as a single argument?  It would be
fabulous if this could be added in such a way that all targets would support
it instantly.

Thanks.

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-08-02 10:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-06  9:19 stack check support on embedded targets Joel Sherrill
2001-08-02 10:19 ` machine description problem Olivier Garbil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).