From: "张雨姗(ZHANG Yushan)-11310380" <zhangys3@mail.sustc.edu.cn>
To: gdb <gdb@sourceware.org>
Subject: Question on process record feature
Date: Sun, 08 Oct 2017 09:00:00 -0000 [thread overview]
Message-ID: <tencent_65CC9A03392D3F9660C9F97F@qq.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1934 bytes --]
This is the first time using this mailing-list, I don't know if the mail I sent on Oct 6 was successful or not because I didn't see it in the online archive. If you receive the former one, just ignore this, thank you.
==============
Hi all,
Recently I'm doing some readings on reverse debugging and am very glad to know this is already a feature in GDB. I'm playing with the process record feature after GDB 7.0 release. Within this tutorial (https://sourceware.org/gdb/wiki/ProcessRecord?highlight=%28OngoingWork%29), the following should work:
(gdb) break _start
(gdb) run
(gdb) record
(gdb) break main
(gdb) break foo
(gdb) break bar
(gdb) continue
(gdb) continue
Continuing.
Breakpoint 2, main ()
at /data/home/msnyder/cvs/localhost/dumpload/gdb/testsuite/gdb.reverse/break-reverse.c:34
34 xyz = 0; /* break in main */
(gdb) continue
Continuing.
Breakpoint 3, foo ()
at /data/home/msnyder/cvs/localhost/dumpload/gdb/testsuite/gdb.reverse/break-reverse.c:28
28 xyz = 1; /* break in foo */
(gdb) continue
Continuing.
......
But actually what happens to me is the program stops after the first "continue" command, but should stop at the "main" breakpoint.(see attach) From the information given I know there is something wrong but cannot locate the problem to the OS or the GDB itself. Could anyone help me to understand this problem? What works for me is to start "record" commands after entering the main function.
My machine is Ubuntu 16.04.3 server amd64 with GDB 7.11.1.
I appreciate any possible help.
Thanks,
Yushan
-------------------------------------------------------------------
Yushan Zhang (Undergraduate)
Student, Class of 2018
Dept. of Computer Science and Engineering
Southern University of Science and Technology (SUSTech, a.k.a SUSTC)
1088 Xueyuan Rd., Nanshan District, Shenzhen, China 518055
Email: zhangys3@mail.sustc.edu.cn
[-- Attachment #2: stops-incorrect result.png --]
[-- Type: application/octet-stream, Size: 49506 bytes --]
next reply other threads:[~2017-10-08 9:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-08 9:00 张雨姗(ZHANG Yushan)-11310380 [this message]
2017-10-08 9:23 ` Jan Kratochvil
2017-10-08 14:18 ` 张雨姗(ZHANG Yushan)-11310380
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=tencent_65CC9A03392D3F9660C9F97F@qq.com \
--to=zhangys3@mail.sustc.edu.cn \
--cc=gdb@sourceware.org \
/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