How to log instructions with GDB

Mahmood Naderan mahmood.nt@gmail.com
Wed Mar 10 12:14:31 GMT 2021


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> 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> On Behalf Of Mahmood Naderan via
> > Gdb
> > Sent: Montag, 8. März 2021 15:33
> > To: 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>
> 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