1. 编译 加 -g
2. 启动run
或者start
The `start' command does the equivalent of setting a temporary breakpoint at the beginning of the main procedure and then invoking the `run' command.
gdb ./main
(gdb) start
3. 可以使用wrapper
4. set args
show args
5. 当前工作目录
cd directory
Set the gdb working directory to directory.
pwd
Print the gdb working directory.
info proc
to find out the current working directory of the debuggee
6. gdb输入输出重定向