How to log instructions with GDB
Metzger, Markus T
markus.t.metzger@intel.com
Wed Mar 10 13:00:25 GMT 2021
Looks like neither PT nor BTS is virtualized. You’d need to try on a physical system.
The GDB manual describes record full and there’s also ‘help record’.
Regards,
Markus.
From: Mahmood Naderan <mahmood.nt@gmail.com>
Sent: Mittwoch, 10. März 2021 13:15
To: Metzger, Markus T <markus.t.metzger@intel.com>; gdb@sourceware.org
Subject: Re: How to log instructions with GDB
I am trying that on virtualbox. I get
(gdb) record btrace
Target does not support branch tracing.
Also, I would like to know where is the file contains "record full" information?
Regards,
Mahmood
On Wed, Mar 10, 2021 at 12:27 PM Metzger, Markus T <markus.t.metzger@intel.com<mailto:markus.t.metzger@intel.com>> wrote:
Hello Mahmood,
There's the 'record' command to start recording the execution. By default, you'd
get s/w recording ('record full') that also records data. With 'record btrace' you'd
get a h/w recording solution on systems that support it.
At least 'record btrace' supports 'record instruction-history', which should do
what you're looking for. It is supported on recent IA systems.
There's some documentation on those in the GDB manual.
Regards,
Markus.
> -----Original Message-----
> From: Gdb <gdb-bounces@sourceware.org<mailto:gdb-bounces@sourceware.org>> On Behalf Of Mahmood Naderan via
> Gdb
> Sent: Montag, 8. März 2021 15:33
> To: gdb@sourceware.org<mailto:gdb@sourceware.org>
> Subject: How to log instructions with GDB
>
> Hi,
> I would like to know if GDB has a mechanism to trace the execution
> instructions while debugging.
> I am looking for a way to write the executed instructions (similar to the
> disassembly format) in a file.
>
> Regards,
> Mahmood
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de<http://www.intel.de> <http://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
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://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
More information about the Gdb
mailing list