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.
This commit is contained in:
parent
8d0050ea19
commit
ae20e79ae8
8 changed files with 224 additions and 29 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue