Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Metzger, Markus T via Gdb" <gdb@sourceware.org>
To: Mahmood Naderan <mahmood.nt@gmail.com>,
	"gdb@sourceware.org" <gdb@sourceware.org>
Subject: RE: How to log instructions with GDB
Date: Wed, 10 Mar 2021 13:00:25 +0000	[thread overview]
Message-ID: <DM5PR11MB16901CF7FF21D5B48D67129FDE919@DM5PR11MB1690.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CADa2P2XoiJXRqFje4fEYn-VAL3nRQZGo=vgQ7j2AgYTfxeB0wA@mail.gmail.com>

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

      reply	other threads:[~2021-03-10 13:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 14:32 Mahmood Naderan via Gdb
     [not found] ` <DM5PR11MB1690D03D9484A8043834A68BDE919@DM5PR11MB1690.namprd11.prod.outlook.com>
2021-03-10 12:14   ` Mahmood Naderan via Gdb
2021-03-10 13:00     ` Metzger, Markus T via Gdb [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM5PR11MB16901CF7FF21D5B48D67129FDE919@DM5PR11MB1690.namprd11.prod.outlook.com \
    --to=gdb@sourceware.org \
    --cc=mahmood.nt@gmail.com \
    --cc=markus.t.metzger@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox