Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target child does not support this command error when running reverse-step

Tags:

debugging

gdb

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?

like image 536
lang2 Avatar asked Feb 16 '23 23:02

lang2


1 Answers

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

b main
run
record
like image 121
Yu Hao Avatar answered May 06 '23 05:05

Yu Hao