This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question on process record feature


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: stops-incorrect result.png
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]