diff options
author | Tim Wiederhake <tim.wiederhake@intel.com> | 2017-05-02 11:35:54 +0200 |
---|---|---|
committer | Tim Wiederhake <tim.wiederhake@intel.com> | 2017-05-02 11:35:54 +0200 |
commit | ae20e79ae852fee8f7d42701a54a95de3b79ecea (patch) | |
tree | 616d593dcb7ef8249449028538998a7ff6a180e4 /gdb/python/py-record.c | |
parent | 8d0050ea192c41349c1f2b000866c1bdb761abeb (diff) | |
download | binutils-gdb-ae20e79ae852fee8f7d42701a54a95de3b79ecea.tar.gz |
Python: Use correct ptid in btrace recording
The user would always get the instruction_history and function_call_history
objects of the current thread, not the thread for which the gdb.Record object
was created.
The attached testcase fails without this patch and passes with the patch.
Diffstat (limited to 'gdb/python/py-record.c')
-rw-r--r-- | gdb/python/py-record.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c index 60c0a7ce92b..63cd293c5d3 100644 --- a/gdb/python/py-record.c +++ b/gdb/python/py-record.c @@ -18,26 +18,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "defs.h" -#include "inferior.h" -#include "record.h" -#include "python-internal.h" +#include "py-record.h" #include "py-record-btrace.h" #include "py-record-full.h" #include "target.h" -/* Python Record object. */ - -typedef struct -{ - PyObject_HEAD - - /* The ptid this object refers to. */ - ptid_t ptid; - - /* The current recording method. */ - enum record_method method; -} recpy_record_object; - /* Python Record type. */ static PyTypeObject recpy_record_type = { |