The following script causes gdb 7.9-1ubuntu1 (Vivid) to abort. ``` python def function(*a): gdb.execute('info program', to_string=True, from_tty=False) python gdb.events.new_objfile.connect(function) run ```
I can reproduce this abort in older gdb version, but from gdb-8.3.0 forward I see these errors instead: ``` Reading symbols from gdb-13380.exe... (gdb) python def function(*a): gdb.execute('info program', to_string=True, from_tty=False) (gdb) python gdb.events.new_objfile.connect(function) (gdb) run Starting program: C:\src\tests\gdb-13380.exe Python Exception <class 'gdb.error'> No selected thread.: Python Exception <class 'gdb.error'> No selected thread.: Python Exception <class 'gdb.error'> No selected thread.: Python Exception <class 'gdb.error'> No selected thread.: Python Exception <class 'gdb.error'> No selected thread.: [Inferior 1 (process 6096) exited normally] ``` And since the recently released gdb-14.1 all problems appear to be gone: ``` Reading symbols from gdb-13380.exe... (gdb) python def function(*a): gdb.execute('info program', to_string=True, from_tty=False) (gdb) python gdb.events.new_objfile.connect(function) (gdb) run Starting program: C:\src\tests\gdb-13380.exe [Inferior 1 (process 10288) exited normally] ``` So I'm going to close this.