$ gdb -n -q (gdb) python print gdb.selected_thread() inferior.c:362: internal-error: find_inferior_pid: Assertion `pid != 0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n)
CVSROOT: /cvs/src Module name: src Changes by: pmuldoon@sourceware.org 2010-11-23 13:33:23 Modified files: gdb : ChangeLog gdb/python : py-inferior.c gdb/testsuite : ChangeLog gdb/testsuite/gdb.python: python.exp Log message: 2010-11-23 Phil Muldoon <pmuldoon@redhat.com> PR python/12212 * python/py-inferior.c (find_thread_object): Check if PIDGET returns 0. 2010-11-23 Phil Muldoon <pmuldoon@redhat.com> PR python/12212 * gdb.python/python.exp: Check that selected_thread raises an error when no inferior is loaded. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12337&r2=1.12338 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-inferior.c.diff?cvsroot=src&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2514&r2=1.2515 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/python.exp.diff?cvsroot=src&r1=1.17&r2=1.18