RTEMS | Add TCB pointer to libdebugger's extra thread info (#5640)

Chris Johns (@chris) gitlab at rtems.org
Wed Jul 8 22:45:12 UTC 2026



Issue created by Chris Johns: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5640

Assignee: Chris Johns

## Summary

Print the TCB or `Thread_Control` pointer in the thread extra info query output. This is shown when you enter `info thread` at a GDB prompt.

The TCB is useful then inspecting objects that contain the TCB pointer. For example:

```
(gdb) p *__mutex
$4 = {
  _Queue = {
    _Lock = {
      _next_ticket = 7632,
      _now_serving = 7632
    },
    _heads = 0x7f49308,
    _owner = 0x7f44668,
    _name = 0x0
  }
}
(gdb) p __mutex->_Queue._owner
$5 = (_Thread_Control *) 0x7f44668
```

The `__mutex->_Queue._owner` field is the TCB and if the `info thread` command shows the TCB for a thread you can see which it is without the need to dump other thread specific details.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5640
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/4-7c7qq1s1qm3jdmjsv559mgyjp-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260708/75533dd2/attachment-0001.htm>


More information about the bugs mailing list