btrace, python: Enable ptwrite filter registration.

By default GDB will be printing the hex payload of the ptwrite package as
auxiliary information.  To customize this, the user can register a ptwrite
filter function in python, that takes the payload and the PC as arguments and
returns a string which will be printed instead.  Registering the filter
function is done using a factory pattern to make per-thread filtering easier.

Approved-By: Markus Metzger <markus.t.metzger@intel.com>
This commit is contained in:
Felix Willgerodt
2018-05-15 15:42:24 +02:00
parent 77a33bb024
commit 6be9971c93
18 changed files with 267 additions and 0 deletions

11
gdbsupport/configure vendored
View File

@@ -12991,6 +12991,17 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
fi
ac_fn_c_check_member "$LINENO" "struct pt_event" "variant.ptwrite" "ac_cv_member_struct_pt_event_variant_ptwrite" "#include <intel-pt.h>
"
if test "x$ac_cv_member_struct_pt_event_variant_ptwrite" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_PT_EVENT_VARIANT_PTWRITE 1
_ACEOF
fi
LIBS=$save_LIBS