question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

thread names not shown (freertos+openocd)

See original GitHub issue

The threads are shown ok, but without names. gdb’s native “info threads” shows the names correctly. Any ideas?

─── Stack ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x0800088a
[1] from 0x0800053e
─── Threads ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[7] id 536885192 from 0x08007b76 in prvProcessTimerOrBlockTask+82 at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/timers.c:603
[6] id 536882504 from 0x08006dba in vTaskDelayUntil+94 at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/tasks.c:1326
[5] id 536880744 from 0x08006052 in xQueueReceive+246 at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/queue.c:1378
[4] id 536881880 from 0x08007f32 in vPortExitCritical+30 at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h:229
[3] id 536883128 from 0x08006dee in vTaskDelay+22 at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/tasks.c:1367
[2] id 536883752 from 0x08006dee in vTaskDelay+22 at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/tasks.c:1367
[1] id 536884376 from 0x0800088a
─── Variables ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>>> info threads
  Id   Target Id                                     Frame 
* 1    Thread 536884376 (Name: IDLE, State: Running) 0x0800088a in ?? ()
  2    Thread 536883752 (Name: deep)                 vTaskDelay (xTicksToDelay=90000) at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/tasks.c:1367
  3    Thread 536883128 (Name: stats)                vTaskDelay (xTicksToDelay=xTicksToDelay@entry=1000) at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/tasks.c:1367
  4    Thread 536881880 (Name: metering)             0x08007f32 in vPortExitCritical () at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h:229
  5    Thread 536880744 (Name: modbus)               xQueueReceive (xQueue=0x20003838 <ucHeap+5588>, pvBuffer=pvBuffer@entry=0x200025d7 <ucHeap+883>, xTicksToWait=<optimized out>, xTicksToWait@entry=50) at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/queue.c:1378
  6    Thread 536882504 (Name: led)                  vTaskDelayUntil (pxPreviousWakeTime=pxPreviousWakeTime@entry=0x20002d14 <ucHeap+2736>, xTimeIncrement=xTimeIncrement@entry=10) at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/tasks.c:1326
  7    Thread 536885192 (Name: Tmr Svc)              prvProcessTimerOrBlockTask (xListWasEmpty=<optimized out>, xNextExpireTime=0) at /home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/timers.c:603
>>> python print(gdb.Inferior.threads(gdb.inferiors()[0])[1].name)
None
>>> python print(gdb.Inferior.threads(gdb.inferiors()[0])[1].ptid)
(42000, 536882504, 0)
>>> python print(gdb.Inferior.threads(gdb.inferiors()[0])[0].ptid)
(42000, 536885192, 0)
>>> python print(gdb.Inferior.threads(gdb.inferiors()[0])[0].name)
None
>>> 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
karlpcommented, Sep 9, 2020

well, yeah, there. sure. filed https://sourceware.org/bugzilla/show_bug.cgi?id=26593 and yeah, can’t really be a bug in this per se.

0reactions
cyrus-andcommented, Sep 9, 2020

Thank you, for filing that bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

rtos FreeRTOS" on ST-LINK(OpenOCD)]. - ST Community
In this version, openocd outputs 'Error: No symbols for FreeRTOS'. ... Note that the Debug Tab does not show threads, but the NXP...
Read more >
FreeRTOS Thread Debugging with Eclipse and OpenOCD
With this I'm able to show all the FreeRTOS threads in the Eclipse debug view and can ... OpenOCD Error about FreeRTOS Symbol...
Read more >
[SOLVED] FreeRTOS thread support - mis-aligned errors ...
ERROR: Error reading thread name in FreeRTOS task control block. Looking through the differences in the GDBPlugin logs we see the following:
Read more >
FreeRTOS.c Source File - OpenOCD
178 LOG_ERROR("Could not read FreeRTOS thread count from target"); ... 214 /* OR : No current thread - all threads suspended - show...
Read more >
FreeRTOS debugging with openOCD - Stack Overflow
Its not running on an STM32 - but perhaps the following will help ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found