![](/img/trans.png)
[英]How to break the REMOTE debugged Linux kernel from the LOCAL machine via GDB + KGDB?
[英]How to redirect multiple inputs from files to a binary being debugged in gdb?
我在gdb中调试的二进制文件首先要求我提供一个ID,然后该ID是否有效要求第二个输入。
gef➤ run
Agent ID : 48093572 //This is the first input which the user has to enter
Login Validated
Main Menu:
1. Extraction Points
2. Request Extraction
3. Submit Report
0. Exit
Enter selection: // This is the second input the user has to enter
如何使用'<'运算符传递文件中的两个输入。 如果只有一个输入,我可以这样做
gef➤ run < input.txt
但是以上方法不适用于多个输入。
*注意:-gef是gdb的附加组件
如果您尚未找到解决方案,或者其他人需要此信息,这对我有用:
gdb$ r < <(cat 1_intest.txt 2_intest.txt)
每个输入都通过对应相应文件的内容传递给程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.