mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-24 02:37:23 +08:00
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:
@ -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 = {
|
||||
|
Reference in New Issue
Block a user