So, while nweb is still running in another xterm session, halt the strace by pressing Ctrl + c, and then launch the GDB Debugger by typing the commands shown in Listing 5.
因此,在nweb运行于另一个xterm会话的同时,按下Ctrl +c停止strace,然后输入清单5中所示的命令启动gdb调试工具。
Enter it into your favorite text editor with the same line spacings, save as' eg1.c ', compile with 'GCC -g eg1.c -o eg1' and start GDB with 'GDB eg1'.
在您喜欢的文本编辑器中输入这个程序(要保持相同的行距),保存为'eg1 . c ',使用'gcc- geg1 . c -o eg1 '进行编译,并用'gdb eg1 '启动gdb。
Similarly, the CDT leverages and integrates with standard C/C++ tools, such as g++, make, and GDB.
同样地,CDT 将利用标准的C/C++工具并与之集成,例如 g++、make和GDB。
To debug with a core file, you need the program executable and source files, as well as the core file. To start GDB with a core file, use the -c option.
要用核心文件进行调试,您不仅需要程序的可执行文件和源文件,还需要核心文件本身。
Running eg1.c with 'run' GDB will break when "value" equals "div", avoiding having to 'continue' manually until they are equal.
使用'run '运行eg1 . c时,如果“value ”等于“div ”,gdb将中断,从而避免了在它们相等之前必须手工执行'continue '。
Running eg1.c with 'run' GDB will break when "value" equals "div", avoiding having to 'continue' manually until they are equal.
使用'run '运行eg1 . c时,如果“value ”等于“div ”,gdb将中断,从而避免了在它们相等之前必须手工执行'continue '。
应用推荐