This is the mail archive of the
mailing list for the GDB project.
RE: Could not use "record btrace" even if I have Intel PT hardware feature
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: "mudongliangabcd at gmail dot com" <mudongliangabcd at gmail dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Tue, 6 Sep 2016 14:59:39 +0000
- Subject: RE: Could not use "record btrace" even if I have Intel PT hardware feature
- Authentication-results: sourceware.org; auth=none
- References: <CAD-N9QUz19B6Dj2J+=RZ1G4Nfjko3PZD-6_v+hVEsmfjWTR9vg@mail.gmail.com>
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org] On
> Behalf Of ???
> Sent: Tuesday, September 6, 2016 4:37 PM
> To: email@example.com
> Subject: Could not use "record btrace" even if I have Intel PT hardware feature
> I encounter one problem when I try to leverage Intel PT to do branch tracing.
> My cpu has Intel PT feature via "grep intel_pt /proc/cpuinfo".
> $ grep intel_pt /proc/cpuinfo
> flags : ...intel_pt...
> $ gdb simple
> (gdb) b main
> Breakpoint 1 at 0x40050c
> (gdb) r
> Starting program: .../Work/Projects/simple
> Breakpoint 1, 0x000000000040050c in main ()
> (gdb) record btrace
> Target does not support branch tracing.
> (gdb) record btrace pt
> GDB does not support Intel Processor Trace.
You need a kernel that supports it (4.1+) and you need a GDB that supports it.
Newer Linux distributions should already provide GDB with Intel PT support. If
your distribution doesn't or if you want to build GDB yourself, please configure
it with "--with-intel-pt".
If your Linux distribution does not provide libipt(-devel), you may need to
build it yourself. You can get the sources from here:
You may also need to configure GDB with "--with-libipt-prefix=<path-to-libipt>"
if you don't (want to) install libipt in a standard place.
You may further need to install kernel headers - GDB needs
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928