4

I'm playing with gdb reverse debug. So I have a simple C program with main() and foo() which is called in main().

Inside gdb, I did the following

b main
record
run

And then I step into foo() with:

s

And then I tried to go back with

reverse-step

That's when I got the error message in the title.

My gdb version is: GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu

What have I done wrong?

lang2
  • 10,393
  • 16
  • 76
  • 123

1 Answers1

8

You must start debugging the program (with the run command) before using record to start recording. Try

b main
run
record
Yu Hao
  • 115,525
  • 42
  • 225
  • 281