[Reprinted] GDB Reverse Debugging (Reverse Debugging), gdbdebugging
I remember that when I first started learning C language, I used vc's F10 to debug the program. It was often a burst of crazy press, and I accidentally pressed it. As a result, I had to start over again. At that time, I asked my teacher if I could go back a few steps. My teacher told me sadly, no, but I didn't go back when I opened the bow. I still remember this sentence, and I still think so.
It was not until today that GDB had a reverse debugging BUG. This is a blog about it! Blog address
I personally understand that this reverse debugging requires the program to start the record through the record command after running, and then execute it to perform reverse debugging, that is to say, this program only records the field information of each debugging step, and then enters an rn or rs to return the information of that record!