GDB Manual 15 1 15
1 Commands to specify files 指定文件的命令 You may want to specify executable and core dump file names
The usual way to do this is at start-up time, using the arguments to GDB's start-up commands (see section Getting In and Out of GDB)
你可以指定可执行文件和 core dump 文件的名称
通常的做法是在启动的时候,传递参数给启动 GDB 的命令(请看段“进入与退出 GDB” ) Occasionally it is necessary to change to a different file during a GDB session
Or you may run GDB and forget to specify a file you want to use
Or you are debugging a remote target via gdbserver (see section file)
In these situations the GDB commands to specify new files are useful
有时候需要在 GDB 的会话过程中改变为一个不同的文件
或者你可能在运行 GDB 后,忘记指定你想要的文件
或者你是在通过 gdbserver 调试一个远程目标(请看段“文件”)
在这些情况下,用于指定新文件的 GDB 命令就变得很有用了
file filename Use filename as the program to be debugged