From ae20e79ae852fee8f7d42701a54a95de3b79ecea Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Tue, 2 May 2017 11:35:54 +0200 Subject: 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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gdb/ChangeLog') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 78e4469..d4741b0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,17 @@ 2017-05-01 Tim Wiederhake + * btrace.c (btrace_fetch): Set inferior_ptid. + * python/py-record-btrace.c: Add "py-record.h" include. + (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin, + recpy_bt_end, recpy_bt_instruction_history, + recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored + in gdb.Record object instead of current ptid. + * python/py-record.c: Include new "py-record.h" file. + (recpy_record_object): Moved to py-record.h. + * python/py-record.h: New file. + +2017-05-01 Tim Wiederhake + * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN, BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix indentation. -- cgit v1.1