0

Since the value I am gonna input is unpredictable befor the program runs. So is there any way to input like "\x01\x02" in gdb? The program I am debugging is a c program and the function in the program which needs an input is gets(). Any help would be appreciated! Thanks in advance!

nakeydoln
  • 43
  • 5

1 Answers1

0

the value I am gonna input is unpredictable befor the program runs

Assuming that you mean: "the value that needs to be read can only be determined while debugging the program with GDB", use named pipe as input (and standard GDB I/O redirection).

Employed Russian
  • 199,314
  • 34
  • 295
  • 362