This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
[Python] How to know the current inferior? (exited event)
- From: Kevin Pouget <kevin dot pouget at gmail dot com>
- To: gdb at sourceware dot org
- Date: Wed, 20 Apr 2011 06:53:30 -0400
- Subject: [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