]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Python: Use correct ptid in btrace recording
authorTim Wiederhake <tim.wiederhake@intel.com>
Thu, 4 May 2017 07:05:00 +0000 (09:05 +0200)
committerTim Wiederhake <tim.wiederhake@intel.com>
Thu, 4 May 2017 07:05:00 +0000 (09:05 +0200)
commitee53a929a4c74456661f60741ec22139e06ebc70
treeaa5445202d4311cae1d14ed0ea66106fbb415161
parentd4c682630c6ff6c8e159b833e7a8f2915853369a
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.
gdb/ChangeLog
gdb/btrace.c
gdb/python/py-record-btrace.c
gdb/python/py-record.c
gdb/python/py-record.h [new file with mode: 0644]
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-record-btrace-threads.c [new file with mode: 0644]
gdb/testsuite/gdb.python/py-record-btrace-threads.exp [new file with mode: 0644]