debug c c++ programs more comfortably @ 2014.12.14 trace code meetup
TRANSCRIPT
Debug C/C++ Programs more Comfortably
StarNight @ 2014.12.14 Trace Code Meetup
Who am I?
潘建宏 / Jian-Hong Pan (StarNight)About Me : http://about.me/StarNight
出沒在~
GitHub : starnightPTT : zack2004plurk : StarNightFacebook : Jian-Hong Pan
目前繼續在種花店當個打雜園丁 ~
如果今天期望在這場聽到GDB的使用方法,那我可能
讓你失望了!!!I'll make you disappoint,
if you want to learn how to use GDB!!!
I’ll introduce the toolswhich make debug more efficient.
我要說的是,使用友善的工具讓debug更有效率
I love terminal.I program with VIM & GDB.I want to debug in terminal.
If there is a tool to use GNU Debugger with presented
codes at the same time, that will be useful when
debugging.
Just like this ...
Codes
GNU Debugger
Terminal
● https://github.com/larrupingpig/vimgdb-for-vim7.4
● It is a VIM patch that implements gdb support in the vim editor.
● You need to rebuild VIM with this patch, if you want to install it.
vimGdb
clewn
● http://clewn.sourceforge.net/● It implements gdb support in the vim editor.● It is a program controlling vim through the
netBeans socket interface.● Clewn can only be used with “gvim”, not vim.● Clewn, as a standalone process, needs its
own terminal.
pyclewn
● http://pyclewn.sourceforge.net/● pyclewn allows using vim as a front end to a
debugger.● It is like clewn, but is implemented with
python. → cross platform● pyclewn has more gdb features than clewn.
Comparison of clewn, vimGdb and pyclewn
http://pyclewn.sourceforge.net/
However, I want the tool works in terminal without
graphic support. → no gvimBesides, it is complicated to
install vimGdb.
● http://www.vim.org/scripts/script.php?script_id=4582
● GDB command line interface and terminal emulator in (G)Vim.
● https://www.youtube.com/watch?v=ZcSjaYSoqnc
● It needs GDB 7.0+ and full python 2.7 support.
● It is a “VIM plugin”.
Conque GDB
Considering embedded system development, debugging with cross compile tool-chain is
needed.That will be a problem to Conque GDB.
● https://cgdb.github.io/● cgdb is a lightweight curses (terminal-based)
interface to the GNU Debugger (GDB).● It provides a split screen view that displays
the source code as it executes.● http://tech.mozilla.com.tw/posts/3826/cgdb-
%E6%9B%B4%E5%A5%BD%E7%94%A8%E7%9A%84-gdb
● It is awesome!!!
cgdb
Thank you ~