我基本上想通过模拟环境变量和标准输入流来使用 gdb 调试 cgi 程序。
如何设置变量和标准输入?
我正在使用 lampp 和 gdb。
谢谢!
最佳答案
来自 http://inside.mines.edu/~lwiencke/elab/gdb/gdb_19.html :
show environment [varname]
set environment varname [=] value
来自http://davis.lbl.gov/Manuals/GDB/gdb_5.html#SEC22
You can redirect your program's input and/or output using shell redirection with the run command. For example,
例如
run < input_file
将重定向您调试程序的标准输入。
关于c++ - 通过模拟调试CGI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2751176/