开发者

Debug CGI by simulation

I basically want to debug a cgi programm with gdb by emulating the environment variables and stdin stream.

How do I set 开发者_高级运维the variables and stdin?

I am using lampp and gdb.

Thanks!


From http://inside.mines.edu/~lwiencke/elab/gdb/gdb_19.html:

show environment [varname]
set environment varname [=] value 

And from 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,

E.g.

run < input_file

would redirect the standard input of your debugged program.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜