[En-Nut-Discussion] Debugging threads

Ole Reinhardt ole.reinhardt at embedded-it.de
Thu Jun 28 19:21:32 CEST 2018


Hi Uwe,

I remember we had a similar discussion quite some time ago. If I
remember correctly, someone just wrote Nut/OS for gdb some (long) time
ago. But I'm very unsure...

I think you'd need a tracing solution. If the debugger stops in the idle
thread you'll quite likely be in the idle thread, which means that your
code waits for something (for some data on a socket or uart, a mutex, a
sleep, etc.) an no other thread is runnable.

So you ideally need to trace back your code path into the past to see
from where you changed into the idle thread.


Best regards,

Ole

Am 28.06.2018 um 15:28 schrieb Uwe Bonnes:
> Hello,
> 
> how to  debug a programm with a hanging thread?
> When interrupting the debugger with ^C, gdb always land in the idle thread.
> 
> How do other people handle that problem?
> 
> Probably something like
> https://github.com/gsmcmullin/gdb_chibios
> implemented for NutOs would be usefull. Any volunteers?
> 
> Thanks
> 

-- 
Embedded-IT
Alter Weg 3
57223 Kreuztal
http://www.embedded-it.de

Tel.: +49-177-7420433


More information about the En-Nut-Discussion mailing list