Reputation: 444
I want to pass some inputs to my gdb debugger to automate it.
Something like this:
Enter number of inputs:
5
Enter 5 inputs:
2 4 3 2 5
I have an expect script for that to automate my binary file.
Can I combine my expect script and gdb script?
Upvotes: 0
Views: 900
Reputation: 93446
Create a file testinput.txt containing:
5
2 4 3 5 2
Then in gdb:
(gdb) run < testinput.txt
Upvotes: 2