- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Can someone please let me know whether there is a traceback utility in NiOS? I want to print the function call trace in run-time, just like gdb but without using NiOS console. I want this function call trace to be printed on my UART? Is there an existing function that i can call to print the stack trace or if anyone has a handy piece of code, can you please share. Also, if interrupts are enabled will it also print the ISR routine and the execution path during which the interrupt happened? BTW, there is no operating system in the system i use and its my own micro kernel, while loop checking for events that happens during interrupt context and processing them. Thanks and Regards, BalajiLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you have compiled with a frame pointer then you may be able to build your own on top of the GCC function __builtin_return_address.
This probably won't be able to trace back through interrupts as they use a different format of stack frame.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply, can you please let me know if there is an example code around? And what is the compiler option
to enable frame pointer, i'm not optimising the code, will not framepointer be already there? Thanks and Regards, Balaji- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, no example designs for this.
See the GCC documentation for details of how to enable the frame pointer. I think it's something like -fno-omit-frame-pointer but I probably spelt that wrong.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page