473,403 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Stack Trace

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

Jan 11 '06 #1
3 2239
In comp.arch.embedded su**********@gmail.com wrote:
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.
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 ;-)
How to implement something like this? Where do I need to look?


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 (br*****@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Jan 11 '06 #2
su**********@gmail.com writes:
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?


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) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jan 11 '06 #3
su**********@gmail.com wrote:
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?


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).

--
************************************************** ******************
Paul E. Bennett ....................<email://pe*@amleth.demon.co.uk>
Forth based HIDECS Consultancy .....<http://www.amleth.demon.co.uk/>
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-811095
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
************************************************** ******************
Jan 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Andy Fish | last post by:
Hi, in my c# code I have something like this: try { ... } catch (Exception ex) { ... throw ex; }
3
by: Mike Schilling | last post by:
Instances of SystemOutOfMemoryException do not contain a stack trace. Easy test to verify this: class OOM { public static void Main() { try { Object arr = new Object; } catch...
0
by: Mike Schilling | last post by:
I have some code that calls methods reflectively (the method called and its parameters are determined by text received in a SOAP message, and I construct a map from strings to MethodInfos). The...
1
by: Jason Coyne | last post by:
I am trying to use the StackTrace class to get my current stack trace for some logging. Everything is working fine, except when I am using threading (specifically WaitCallBack and...
3
by: Jeremy | last post by:
While working with ASP.NET I've sometimes encountered errors in my applications, but I've always known exactly why I'm getting the error and have been able to fix it. So I've never needed to...
2
by: Lasse Vågsæther Karlsen | last post by:
If I got the following code: try { // something that might throw an exception } catch (Exception ex) { // Log contents of ex here throw;
3
by: barker7 | last post by:
I am calling an unmanaged C++ method from C#. When an exception occurs in the C++ code, it gets caught in our C# code. CSharpMethod() { try { NativeCPPMethod(); } catch (Exception e)
5
by: Mr. SweatyFinger | last post by:
WHY CAN'T THE CLOWN -HOLES WHO WROTE ASP.NET PROVIDE AN ERROR LINE NUMBER??? HONEST TO SH@THOLE PETE Server Error in '/New Folder (7)' Application....
4
by: call_me_anything | last post by:
Here is a code to have a debug printf : #ifdef DEBUG #define DEBUG_printf(...) {printf(":",__FUNCTION__);printf(__VA_ARGS__);printf("\n");} #else #define DEBUG #endif int main () {
3
by: Dave Anson | last post by:
I have a custom exception and I want to write the information to the event log, including the Stack Trace. I can create the message and write to the event log no problem, but the Stack Trace is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.