Switch/browse task backtraces from Eclipse?

jubajube wrote on Tuesday, July 31, 2012:

I’m looking for an Eclipse plugin for FreeRTOS that allows me to view the backtraces of each task.  Eclipse GDB Hardware Debugging by itself only shows me the backtrace of the currently running task.  This makes perfect sense because neither Eclipse nor GDB have any knowledge of FreeRTOS.  However, I’m thinking an intelligent plugin might do better!

I tried the StateViewer plugin from High Integrity Systems, but it only shows me the list of tasks and their priorities, stack pointers/tops, state, and what event it’s waiting/blocked on (if any).  It does not have the ability to show me backtraces of these tasks, which would be incredibly useful for seeing the full context, local variable states, etc.  I know all the information is there in the stacks of each task, and it’s only a matter of parsing those stacks.

Since GDB does this already for the currently running task, I wouldn’t mind if I had to “switch” to a different task in order to leverage GDB to view another task’s backtrace.  Unfortunately, StateViewer doesn’t support that either.  I’m forced to set strategic breakpoints where I know other tasks will hit, and let the processor run to those breakpoints.  One big disadvantage of this is that if the target system has crashed or locked up, setting those breakpoints and letting the processor run is no longer a viable option.

Does an Eclipse plugin exist that has these features, or must I write one myself?

rtel wrote on Tuesday, July 31, 2012:

I know of one person who is working on threading support using the standard Eclipse and GDB features, but it is a background project so I don’t know if or when it will be available.  If you create something please post it to the FreeRTOS interactive site as I think it will be of great interest to the community.


uecasm wrote on Thursday, December 06, 2012:

Do you have a link for this or any further information on it?  It’s something I’d be quite interested in too, even if I had to manually run a “switch to stack at 0xNNNNNNNN” command or something - though obviously it’d be nicer if it went into the Debug tab like “normal” threads.

It’d be especially helpful when trying to diagnose exceptions or interrupt races.

jblackarty wrote on Saturday, March 23, 2013:

I’m interested too. I saw that OpenOCD stub supports exactly this feature, but I use J-Link GDB server. It would be much more flexible if this feature being handled on gdb client side, or, even better, on eclipse side.

jblackarty wrote on Saturday, March 30, 2013:

I made contribution:

even if I had to manually run a “switch to stack at 0xNNNNNNNN” command or something

uecasm, exactly as you wanted :wink: thank you for idea :slight_smile:

jblackarty wrote on Saturday, March 30, 2013:

forgot to say: it’s for arm cortex-m3 mpu port only

jdallaway wrote on Friday, August 15, 2014:

The Code Confidence Tools for FreeRTOS provide per-task backtrace: http://www.codeconfidence.com/tools