This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How to show instructions in one record
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: 慕冬亮 <mudongliangabcd at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 6 Sep 2016 17:00:17 +0200
- Subject: Re: How to show instructions in one record
- Authentication-results: sourceware.org; auth=none
- References: <CAD-N9QV0vLTAmyo76HGZZYuToDZbOZzsrvDfmj535Wb8VWANvg@mail.gmail.com>
On Tue, 06 Sep 2016 16:13:52 +0200, 慕冬亮 wrote:
> So how to show instructions in one record?
I do not fully understand what "instructions in one record" mean but some
demo:
(gdb) start
[...]
(gdb) record
(gdb) c
Continuing.
Program received signal SIGINT, Interrupt.
__memcpy_sse2 () at ../sysdeps/x86_64/memcpy.S:203
203 movq %r9, 16(%rdi)
(gdb) info record
Active record target: record-full
Record mode:
Lowest recorded instruction number is 1.
Highest recorded instruction number is 100092.
Log contains 100092 instructions.
Max logged instructions is 10000000.
(gdb) reverse-stepi
203 movq %r9, 16(%rdi)
(gdb)
202 movq %r8, 8(%rdi)
(gdb)
201 movq %rax, (%rdi)
(gdb)
199 movq 24(%rsi), %r10
(gdb)
198 movq 16(%rsi), %r9
(gdb) info record
Active record target: record-full
Replay mode:
Lowest recorded instruction number is 1.
Current instruction number is 100087.
Highest recorded instruction number is 100092.
Log contains 100092 instructions.
Max logged instructions is 10000000.
(gdb) frame
#0 __memcpy_sse2 () at ../sysdeps/x86_64/memcpy.S:198
198 movq 16(%rsi), %r9
(gdb) x/i $pc
=> 0x7ffff50311e9 <__memcpy_sse2+217>: mov 0x10(%rsi),%r9
(gdb) _