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?

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
lang2
  • 11,433
  • 18
  • 83
  • 133

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
  • 119,891
  • 44
  • 235
  • 294