Hi,

I've been working on a plugin for gdb that would allow the debugger to
access information about each individual task running on the system.
This can be useful in many scenarios e.g. when debugging deadlocks.

Screenshot from Eclipse: http://imgur.com/Xm0tv4i

I created it as a separate project, as it was easier to develop that
way. You can find the source code on my Github page:
https://github.com/michal-narajowski/mynewt-gdb-plugin/.
It was a lot of fun figuring out how the registers are recorded on the
stack, and I wouldn't be able to do this without extra help from
Andrzej Kaczmarek. Kudos to you!
For now, only Cortex M4 is supported.

To use the plugin:
- Build the library (project includes makefiles and Visual Studio
project, although I tested only the Linux makefile)
then:
- Run "newt debug --extrajtagcmd "-rtos path/to/plugin.so" <target>"
- Allow the system to run for a moment, then suspend it in gdb
- Run "info thread"
or
- Run "newt -n debug --extrajtagcmd "-rtos path/to/plugin.so" <target>"
- Start debugger under Eclipse (info on how to set it up with Mynewt
can be found here:
https://www.codecoup.pl/blog/hacking-mynewt-in-eclipse/)
- Suspend the system and view the information about tasks

I'm looking for answers to some questions:
* Where to put the code?
* Should we integrate it into Mynewt?
* How to integrate it?

Best regards

Michał Narajowski

Reply via email to