This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Python] How to know the current inferior? (exited event)


Hello,

is there a way to know the current inferior from GDB's Python interface ?

I can see `gdb.selected_thread()', so
> for inf in gdb.inferiors():
>    if inf.pid == gdb.selected_thread().ptid[0]:
>        return inf

give the current inferior, but when I receive a `events.exited',
gdb.selected_thread() returns None and I can't find any way to know
which inferior exited ...


cordially,

Kevin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]