便便代码人生

关注技术, 偶尔动动手

[原]Linux下的c/c++ GDB调试

Posted by bianbian on 2007-09-18 22:13

本文Tags: , , ,

还是比较厉害的,比较准。
编译的时候加入 -g -rdynamic 选项,之后就可以跑调试了:
linux $ gcc -g -rdynamic -o error error.c
linux $ gdb error
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “i686-pc-linux-gnu”…Using host libthread_db library “/lib/libthread_db.so.1″.

(gdb) run
Starting program: /home/linux/error

Program received signal SIGSEGV, Segmentation fault.
错误内容
行数 源码;
(gdb) kill
(gdb) q

linux $

标签: , , ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

7 Responses to “[原]Linux下的c/c++ GDB调试”

  1. 同盟 Says:

    强银

  2. swf decompiler magic v5 2 1 2133 winall regged crd free download Says:

    swf decompiler magic v5 2 1 2133 winall regged crd multilingual portable…

    swf decompiler magic v5 2 1 2133 winall regged crd serial keygen…

  3. onone phototune v3 0 3 x86x64 redt 75 6 mb 2 free Says:

    onone phototune v3 0 3 x86x64 redt 75 6 mb 2 full version…

    onone phototune v3 0 3 x86x64 redt 75 6 mb 2 free download…

  4. topaz dejpeg 4 0 2 4 free download Says:

    topaz dejpeg 4 0 2 4 keygen…

    topaz dejpeg 4 0 2 4 portable multilingual…

  5. norton 360 v4 0 0 127 full version keygen Says:

    norton 360 v4 0 0 127 free keygen…

    norton 360 v4 0 0 127 free download…

  6. dl2all.info - Full Software Downloads - Download For All: Says:

    dl2all.info – Full Software Downloads – Download For All:…

    [...]» [原]Linux下的c/c++ GDB调试 » » 便便代码人生[...]…

  7. grand theft auto cheats Says:

    grand theft auto cheats…

    [...]» [原]Linux下的c/c++ GDB调试 » » 便便代码人生[...]…

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>