Stack Trace

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,
Please guide me to the right group(s) if the post isn't on topic here.

My program is running on a ARM7 h/w on top of an RTOS. I want to dump
the names of the functions that were called in the sequence they were
called (stack) onto a file as part of the assert routine. Something
like a core dump in *nix.

How to implement something like this? Where do I need to look?

Regards
Sukrit


Re: Stack Trace

Quoted text here. Click to load it

Thats' not very likely a good idea in an embedded system, which won't
typically have anywhere to output this stack dump to in the first
place, nor the symbol tables needed to decode address into names, nor
still be in a state stable enough for the printed dump to be 100%
credible.  You should use existing dedicated debugging interface of
the CPU (--> JTAG) and your development system's debugger instead.  Or
get a development environment that can do that for you, if your
current one doesn't.

Better still, don't let assert() failures occur, ever, in code far
enough from your desk that your debugging tools can't access it ;-)

Quoted text here. Click to load it

If you must ask, the answer is unlikely to be of much use to you.
Such information should be part of your RTOS's and/or compiler's
technical documentation, if it's made available at all.  If you didn't
guess that by yourself, I'm afraid you're rather clearly in over your
head already.

--
Hans-Bernhard Broeker ( snipped-for-privacy@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Re: Stack Trace
snipped-for-privacy@gmail.com writes:
Quoted text here. Click to load it

This looks appropriate for comp.arch.embedded; it's off-topic for
comp.lang.c.  Followups redirected.  (Not that that will do any good
unless everyone responds to this followup.)

--
Keith Thompson (The_Other_Keith) snipped-for-privacy@mib.org  <http://www.ghoti.net/~kst
San Diego Supercomputer Center             <*>  <http://users.sdsc.edu/~kst
We've slightly trimmed the long signature. Click to see the full one.
Re: Stack Trace

Quoted text here. Click to load it

I suspect that you ill need to supply more information about which RTOS and
what programming environment you are using in order to get the most
appropriate response to this question. Of course, had you been using Forth,
I could have given an answer to this as such things are usually easy for a
Forth based system to do (by several methods).

--
********************************************************************
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline