public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/26593] New: python api has no access to thread name from extra_info
@ 2020-09-09 17:31 karlp at tweak dot net.au
  2022-06-11 19:22 ` [Bug python/26593] " tromey at sourceware dot org
  0 siblings, 1 reply; 2+ messages in thread
From: karlp at tweak dot net.au @ 2020-09-09 17:31 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26593

            Bug ID: 26593
           Summary: python api has no access to thread name from
                    extra_info
           Product: gdb
           Version: 8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: karlp at tweak dot net.au
  Target Milestone: ---

Noticed originally on GNU gdb (GNU Tools for Arm Embedded Processors
8-2018-q4-major) 8.2.50.20181213-git
 but inspection on current master indicates that this hasn't changed.

calling "thread info" correctly shows thread names, and we can see here that it
gets them from the "extra_info" section:
https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/thread.c;h=c915407581fb6fba7bdf00968d31d8259557ddb8;hb=HEAD#l996

using the python api however, the ".name" property is "None" and there doesn't
appear to be any attempt to look at extra_info:
https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/python/py-infthread.c;h=f350e367d5ee9430833677dad99c592b927c3139;hb=HEAD#l66

Example of problem output:

>>> info threads
  Id   Target Id                                     Frame 
* 1    Thread 536884376 (Name: IDLE, State: Running) vPortSuppressTicksAndSleep
(xExpectedIdleTime=10) at
/home/karlp/src/FreeRTOSv10.2.1/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c:522
  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])[0].name)
None
>>> python print(gdb.Inferior.threads(gdb.inferiors()[0])[0].ptid)
(42000, 536885192, 0)
>>>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug python/26593] python api has no access to thread name from extra_info
  2020-09-09 17:31 [Bug python/26593] New: python api has no access to thread name from extra_info karlp at tweak dot net.au
@ 2022-06-11 19:22 ` tromey at sourceware dot org
  0 siblings, 0 replies; 2+ messages in thread
From: tromey at sourceware dot org @ 2022-06-11 19:22 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26593

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Since bug #14817 I think thread names can be reported back
such that they show up as a real thread name and not in "extra info"?
So that part would be a missing feature in this particular remote.

Exposing "extra info" as well might be reasonable though.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-11 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 17:31 [Bug python/26593] New: python api has no access to thread name from extra_info karlp at tweak dot net.au
2022-06-11 19:22 ` [Bug python/26593] " tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).