Package: gdb
Version: 7.12-6
Severity: wishlist
Tags: patch

Dear maintainer,

please enable the --with-intel-pt configuration option for gdb. This allows for 
efficient Record-And-Play functionality in GDB [1]

Intel PT (Processor Trace) provides hardware-level tracing capabilities with 
minimal performance overhead on modern Intel CPUs (beginning with the Broadwell 
micro-architecture).
For more information about Intel PT, please refer to [2] and [3].

The Intel PT kernel driver has been merged in 4.1 and various bug fixes have 
come since ([4]).
GDB supports the Intel PT backend for reverse-stepping / backwards-debugging 
since 7.10.

Decoding of the packet stream generated by the Intel hardware is done by 
Intel's Processor Trace Decoding Library libipt [5]. Thus, this patchs adds a 
build-dependency on libipt-dev and a runtime dependency on libipt1.

Please see the patch attached.

Greetings
Jack

[1] https://sourceware.org/gdb/onlinedocs/gdb/Process-Record-and-Replay.html
[2] https://software.intel.com/en-us/blogs/2013/09/18/processor-tracing
[3] https://old.lwn.net/Articles/648154/
[4] http://halobates.de/blog/p/410
[5] https://github.com/01org/processor-trace
From b3fa17d7a4d2eb5d50ecd81f0ae339139b34d854 Mon Sep 17 00:00:00 2001
From: Jack Henschel <jack...@mailbox.org>
Date: Mon, 21 Aug 2017 13:21:35 +0200
Subject: [PATCH] Enable Intel PT

---
 debian/control.in | 1 +
 debian/rules      | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/debian/control.in b/debian/control.in
index 917c36cdb..db3dafdb7 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -35,6 +35,7 @@ Build-Depends:
                liblzma-dev,
                libbabeltrace-dev [amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel mips64el powerpc s390x],
                libbabeltrace-ctf-dev [amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel mips64el powerpc s390x],
+               libipt-dev [amd64],
                python-dev,
 # Python3 build
                python3-dev,
diff --git a/debian/rules b/debian/rules
index 74835a2f7..3850cc53b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -93,6 +93,11 @@ ifneq (,$(filter $(DEB_HOST_ARCH),amd64 armel armhf i386 kfreebsd-amd64 kfreebsd
   arch_config_args += --with-babeltrace
 endif
 
+# Enable Intel Processor Trace (PT) on Linux x86 platform
+ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
+  arch_config_args += --with-intel-pt
+endif
+
 ifdef GDB_TARGET
   run_tests := no
 
-- 
2.14.1

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to