Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Metzger, Markus T" <markus.t.metzger@intel.com>
To: "mudongliangabcd@gmail.com" <mudongliangabcd@gmail.com>,
	"gdb@sourceware.org" <gdb@sourceware.org>
Subject: RE: How to show instructions in one record
Date: Tue, 06 Sep 2016 14:59:00 -0000	[thread overview]
Message-ID: <A78C989F6D9628469189715575E55B233FFB6DF9@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <CAD-N9QV0vLTAmyo76HGZZYuToDZbOZzsrvDfmj535Wb8VWANvg@mail.gmail.com>

> -----Original Message-----
> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On
> Behalf Of ???
> Sent: Tuesday, September 6, 2016 4:14 PM
> To: gdb@sourceware.org
> Subject: How to show instructions in one record

Hello Dongliang,

> I encounter the following problem when I show instructions in one record,
> 
> (gdb) b main
> Breakpoint 1 at 0x80483f3: file simple.c, line 7.
> (gdb) r
> Starting program: /home/vagrant/simple/simple
> 
> Breakpoint 1, main (argc=1, argv=0xbffff7a4) at simple.c:7
> 7    crash = buff;
> (gdb) record
> (gdb) c
> Continuing.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x08048420 in main (argc=1, argv=0xbffff7a4) at simple.c:10
> 10    for (p=buff,q=argv[1];(*q);p++,q++)
> (gdb) record
> btrace                 full                   goto
> save
> delete                 function-call-history  instruction-history
> stop
> (gdb) record instruction-history
> You can't do that when your target is `record-full'
> 
> Then I try "record-core", the same result.
> At last, I try "record-btrace", my system does not support branch tracing.
> So how to show instructions in one record?

The "record instruction-history" and "record function-call-history" commands
are only available for "record btrace" (and "record bts" and "record pt").

If you are using "record full" (or just "record"), you may use the "disassemble"
command to disassemble the current function and the "reverse-stepi" command
to step backwards through the recorded instructions.

Regards,
Markus.

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

  reply	other threads:[~2016-09-06 14:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 14:14 慕冬亮
2016-09-06 14:59 ` Metzger, Markus T [this message]
     [not found] ` <20160906150017.GA22508@host1.jankratochvil.net>
2016-09-06 15:43   ` 慕冬亮
2016-09-06 16:04     ` Jan Kratochvil
     [not found]       ` <CAD-N9QUaaNjG=rmH+PXyni=KBt7eNcbT54XhAr1bzCXb6KZoTw@mail.gmail.com>
2016-09-06 17:15         ` Jan Kratochvil
     [not found]           ` <CAD-N9QU4Ru6VDLB=bSQt5gpFN_YXgn+it3+PnW4rvYkoANVvNQ@mail.gmail.com>
2016-09-06 17:35             ` Jan Kratochvil

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=A78C989F6D9628469189715575E55B233FFB6DF9@IRSMSX104.ger.corp.intel.com \
    --to=markus.t.metzger@intel.com \
    --cc=gdb@sourceware.org \
    --cc=mudongliangabcd@gmail.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