gdb

http://tedlab.mit.edu/~dr/gdbintro.html

http://emacser.com/emacs-gdb.htm

Cxd: 打开目录

C-x space
If you type this sequence while your cursor is in your source code, GDB will set a breakpoint at the line on which your cursor rests.
delete (d) n
Delete the breakpoint or watchpoint whose number is specified by n.
http://www.cnblogs.com/qlwy/archive/2012/06/04/2535297.html

不同的annotate 的值不代表不同的模式:

  • annotate = 0是最基本的模式和在命令行使用gdb完全一样。

  • annotate = 1是单步调试模式,出现上下两个窗口,上面是gdb运行的buffer,下面是你代码的buffer,会在代码 buffer中,同步指示当前运行的语句的位置。

  • annotate = 2是产生注解的模式。

  • annotate = 3是信息最完整的模式。此时的 Emacs 分5个 buffer,从上到下、从左到右依次是:gdb 调试窗口、变量实时变化显示窗口、源代码窗口、栈窗口、断点信息

无论上面的那种情况,都出现了一个现象:程序的输出不能显示,只有在程序退出的时候才显示出来。

gdb-many-windows 切换单窗格/多窗格模式

gdb-restore-windows 恢复窗格布局

原文地址:https://www.cnblogs.com/jvava/p/4118863.html