This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Make gdb.selected_thread().inferior return a new reference
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Sat, 28 Oct 2017 15:22:44 -0400
- Subject: [binutils-gdb] Make gdb.selected_thread().inferior return a new reference
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 484d8d361de65a8489252d14511b77c142d859a1 ***
Author: Maksim Dzabraev <dzabraew@gmail.com>
Branch: master
Commit: 484d8d361de65a8489252d14511b77c142d859a1
Make gdb.selected_thread().inferior return a new reference
thpy_get_inferior function should return a new reference to the
existing inferior object, and therefore should increment its refcount.
Fixed bug looks like this.
If multiple time call gdb.selected_thread ().inferior, gdb throws exception:
(gdb) pi gdb.selected_thread().inferior
<gdb.Inferior object at 0x7f1952bea698>
(gdb) pi gdb.selected_thread().inferior
Python Exception <type 'exceptions.AttributeError'> 'NoneType' object
has no attribute 'inferior':
Error while executing Python code.
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7f54f0474740 (LWP 584) "mc" 0x00007f54ef055c33 in