From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by sourceware.org (Postfix) with ESMTPS id D5C6B3858002 for ; Wed, 22 Jun 2022 11:45:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D5C6B3858002 X-IronPort-AV: E=McAfee;i="6400,9594,10385"; a="344384619" X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="344384619" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 04:45:35 -0700 X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="677498725" Received: from mulvlfelix.iul.intel.com (HELO localhost) ([172.28.48.92]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 04:45:34 -0700 From: Felix Willgerodt To: gdb-patches@sourceware.org, markus.t.metzger@intel.com Subject: [PATCH v5 00/10] Extensions for PTWRITE Date: Wed, 22 Jun 2022 13:43:30 +0200 Message-Id: <20220622114340.55830-1-felix.willgerodt@intel.com> X-Mailer: git-send-email 2.34.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2022 11:45:39 -0000 The older revisions can be found here: V1: https://sourceware.org/pipermail/gdb-patches/2019-May/157933.html V2: https://sourceware.org/pipermail/gdb-patches/2021-June/179908.html V3: https://sourceware.org/pipermail/gdb-patches/2021-June/180035.html v4: https://sourceware.org/pipermail/gdb-patches/2022-May/188772.html The documentation parts that got approved by Eli didn't change, apart from a mechanical change that changed ptwrite_listener to ptwrite_filter. Apart from that I only made some minor changes: * Changed every mention of ptwrite_listener to ptwrite_filter. * Made the ptw callback return std::string instead of a 'malloced' char ptr. * Simplified gdb.exp/skip_btrace_ptw_tests. * Some minor changes to comments and a couple of other shortcomings in the the last three patches. The first 7 are unchanged. Regards, Felix Felix Willgerodt (10): btrace: Introduce auxiliary instructions. btrace: Enable auxiliary instructions in record instruction-history. btrace: Enable auxiliary instructions in record function-call-history. btrace: Handle stepping and goto for auxiliary instructions. python: Introduce gdb.RecordAuxiliary class. python: Add clear() to gdb.Record. btrace, gdbserver: Add ptwrite to btrace_config_pt. btrace, linux: Enable ptwrite packets. btrace, python: Enable ptwrite filter registration. btrace: Extend ptwrite event decoding. gdb/NEWS | 6 + gdb/btrace.c | 65 ++- gdb/btrace.h | 39 +- gdb/config.in | 3 + gdb/configure | 11 + gdb/data-directory/Makefile.in | 1 + gdb/disasm-flags.h | 1 + gdb/doc/gdb.texinfo | 33 +- gdb/doc/python.texi | 168 ++++++++ gdb/extension-priv.h | 5 + gdb/extension.c | 13 + gdb/extension.h | 3 + gdb/features/btrace-conf.dtd | 1 + gdb/guile/guile.c | 1 + gdb/nat/linux-btrace.c | 29 ++ gdb/python/lib/gdb/ptwrite.py | 86 ++++ gdb/python/py-record-btrace.c | 158 +++++++- gdb/python/py-record-btrace.h | 11 + gdb/python/py-record.c | 89 +++- gdb/python/py-record.h | 3 + gdb/python/python-internal.h | 3 + gdb/python/python.c | 2 + gdb/record-btrace.c | 108 ++++- gdb/record.c | 10 + gdb/record.h | 5 +- gdb/remote.c | 30 ++ gdb/testsuite/gdb.btrace/i386-ptwrite.S | 379 ++++++++++++++++++ gdb/testsuite/gdb.btrace/ptwrite.c | 37 ++ gdb/testsuite/gdb.btrace/ptwrite.exp | 219 ++++++++++ gdb/testsuite/gdb.btrace/x86_64-ptwrite.S | 374 +++++++++++++++++ gdb/testsuite/gdb.python/py-record-btrace.exp | 6 +- gdb/testsuite/lib/gdb.exp | 74 ++++ gdbserver/linux-low.cc | 1 + gdbserver/server.cc | 15 + gdbsupport/btrace-common.h | 6 + gdbsupport/common.m4 | 2 + gdbsupport/config.in | 3 + gdbsupport/configure | 11 + 38 files changed, 1976 insertions(+), 35 deletions(-) create mode 100644 gdb/python/lib/gdb/ptwrite.py create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp create mode 100644 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S -- 2.34.3 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928