public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/28429] New: event.inferior_thread gives Inferior instead of InferiorThread in new_thread event
@ 2021-10-06 15:10 liangjs at pku dot edu.cn
  2022-01-05 17:38 ` [Bug python/28429] " ssbssa at sourceware dot org
  0 siblings, 1 reply; 2+ messages in thread
From: liangjs at pku dot edu.cn @ 2021-10-06 15:10 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28429
           Summary: event.inferior_thread gives Inferior instead of
                    InferiorThread in new_thread event
           Product: gdb
           Version: 11.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: liangjs at pku dot edu.cn
  Target Milestone: ---

Created attachment 13710
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13710&action=edit
A python script using new_thread event

When the new_thread event is emitted, event.inferior_thread should be an
InferiorThread object, but gdb gives an Inferior object.

You can run the python script in the attachment to reproduce it.
"a.out" can be any executable file.

$ gdb -q -nx a.out -x "test.py" -ex "run" -ex "quit"
Reading symbols from a.out...
(No debugging symbols found in a.out)
Starting program: /home/liangjs/projects/gdb_trace/a.out 
type is  <class 'gdb.Inferior'>
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
type is  <class 'gdb.Inferior'>
[New Thread 0x7ffff7d9b640 (LWP 230739)]
from new thread
[Thread 0x7ffff7d9b640 (LWP 230739) exited]
[Inferior 1 (process 230735) exited normally]

-- 
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/28429] event.inferior_thread gives Inferior instead of InferiorThread in new_thread event
  2021-10-06 15:10 [Bug python/28429] New: event.inferior_thread gives Inferior instead of InferiorThread in new_thread event liangjs at pku dot edu.cn
@ 2022-01-05 17:38 ` ssbssa at sourceware dot org
  0 siblings, 0 replies; 2+ messages in thread
From: ssbssa at sourceware dot org @ 2022-01-05 17:38 UTC (permalink / raw)
  To: gdb-prs

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

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |ssbssa at sourceware dot org
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |12.1

--- Comment #1 from Hannes Domani <ssbssa at sourceware dot org> ---
Fixed by:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=72df4c816f8a2c6dfb76988ccceee28e28bbaa3d

-- 
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-01-05 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 15:10 [Bug python/28429] New: event.inferior_thread gives Inferior instead of InferiorThread in new_thread event liangjs at pku dot edu.cn
2022-01-05 17:38 ` [Bug python/28429] " ssbssa 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).