目前我自己最喜欢的还是 ddd 、 gdbgui 和 vim-vebugger插件或vimgdb插件 三种。

You could try using Insight a graphical front-end for gdb written by Red Hat Or if you use GNOME desktop environment, you can also try Nemiver.

kdbg is a graphical user interface to gdb, the GNU debugger.

ddd is a graphical front-end to gdb that is pretty nice. One of the down sides is a classic X interface, but I seem to recall it being pretty intuitive.

vim-vebugger 插件或 vimgdb 插件,也可以试试。

推荐使用 nemiver。insight 是 redhat 下的,ubuntu里没有更新。 ddd也不错。看自己喜好。

更推荐使用 gdb dashboard 或者 gdbgui,前者是对字符终端的重定向组合,后者是python实现的web方式的调试前端(我现在正在用的,在我的机器上,用chrome浏览器才能调式)。

https://github.com/cyrus-and/gdb-dashboard

https://github.com/cs01/gdbgui                   我现在正在用的(在我的机器上,用chrome浏览器才能调式)

https://github.com/snare/voltron                  这个可能比 gdb dashboard 还好

除了gdb dashboard之外,以下网址还提供了其它的front end(包括给gdb dashboard上色):

https://stackoverflow.com/questions/209534/how-to-highlight-and-color-gdb-output-during-interactive-debugging/522192

Nemiver的安装:

基于Debian发行版,它的安装时非常直接简单,如下:

$ sudo apt-get install nemiver

在Fedora中安装如下:

$ sudo yum install nemiver 

在Arch Linux中安装如下:

$ sudo pacman -S nemiver 

Nemiver 是一款基于 GTK+ 的用于C/C++程序的图形化的独立调试器,它以GDB作为其后端。最令人赞赏的是其速度和稳定性,Nemiver是一个非常可靠,具备许多优点的调试工具。最令人欣慰的是,它能够很好地与GNOME环境像结合。

kdbg简单使用:

ubuntu下 直接 sudo apt-get install kdbg 即可安装.

若启动后出现 MNG error 11: Function is invalid at this point; chunk MHDR; subcode 0:0 错误, 那么就删除 /usr/share/kde4/apps/kdbg/icons/hicolor/22x22/actions/pulse.mng 这个文件就好了.

界面比较友好. 调试方法很简单:

1.首先g++ -g file.cpp 或  g++ --debug file.cpp  得到文件a.out

2.运行Kdbg选择 File->Excutable 再选中a.out 这个文件,调试代码会自动载入.

3.鼠标点调试代码最左边点空白处,变红色则设置了断点,

4.按F5开始调试 F10单步 F6跳出 F7到鼠标 F8跟进。View->Locals可看变量数据。

ddd的问题之一:       (为什么我的 ddd 需要 root 权限才能显示源码,即便 sudo 也不能显示源码,只有 su 之后在root下才能显示源码?

运行DDD调试器时,出现卡死现象,看软件状态,发现"waiting until GDB gets ready"。 解决办法:

用vim编辑文件 ~/.ddd/init,  将   set extended-prompt not set\n\   这行 改成: set extended-prompt (gdb) \n\       问题解决。

1、gdb 调式子进程:

set follow-fork-mode child

2、gdb打印预定义的宏macro的方法:

必须同时使用以下几个编译选项才能打印:

-g:

Produce debugging information in the operating system's native format (stabs, COFF, XCOFF, or DWARF 2). GDB can work with this debugging information. On most systems that use stabs format, -g enables use of extra debugging information that only GDB can use; this extra information makes debugging work better in GDB but probably makes other debuggers crash or refuse to read the program. If you want to control for certain whether to generate the extra information, use -gstabs+, -gstabs, -gxcoff+, -gxcoff, or -gvms (see below).

-ggdb:

Produce debugging information for use by GDB. This means to use the most expressive format available (DWARF 2, stabs, or the native format if neither of those are supported), including GDB extensions if at all possible.

-gvmslevel:   (示例: -g3, 要打印macro,请使用 -g3

Request debugging information and also use level to specify how much information. The default level is 2. Level 0 produces no debug information at all. Thus, -g0 negates -g.

Level 3 includes extra information, such as all the macro definitions present in the program. Some debuggers support macro expansion when you use -g3.

然后在gdb中使用:

info macro YOUR_MACRO 或者 macro expand YOUR_MACRO

查看相应的macro。

优秀的gdb图形化前端调试器的更多相关文章

  1. 图形化OpenGL调试器 BuGLe [转]

    BuGLe 结合图形化的OpenGL调试与选择的过滤器上的OpenGL命令流.调试器可以查看状态.纹理.framebuffers ,着色器,而过滤器允许日志,错误检查,自由相机控制,视频捕捉等. 主页 ...

  2. Ubuntu 18.04图形化软件包管理器

    1.ubuntu软件这个管理工具提供了一种管理您系统中软件的好方法,通过他可以很直观的查找软件安装很简单,打开终端,输入以下命令:----------------------------------- ...

  3. gdb图形化调试工具总结

    gdb除了命令行方式等的调试之外,还有图形化的调试工具,下面列举一些供参考 1:insight 2: ddd 3: kgdb 4: xxgdb 其它的工具欢迎补充

  4. Ubuntu下的图形化多线程下载器XDM

    目录 1.下载 2.安装 3.浏览器支持 使用Ubuntu下载东西经常过于缓慢,因此需要多进程下载器. 1.下载 下载链接:http://xdman.sourceforge.net/#download ...

  5. GDB 调试器使用手冊

    使用GDB: 本文描写叙述GDB,GNU的原代码调试器. (这是4.12版1994年一月.GDB版本号4.16) * 文件夹: * 摘要: GDB的摘要 * 实例: 一个使用实例 * 入门: 进入和退 ...

  6. 物联网打工人必备:LiteOS Studio图形化调测能力

    摘要:本文会给大家介绍下LiteOS Studio的调测的几个知识点,包括: 调测配置,监视变量,反汇编代码同步展示,数值进制切换,跨平台编译调测,Qemu模拟器调测,多核调测,远程设备调测等. 掌握 ...

  7. 10款免费的MySQL数据库图形化管理工具

    绝大多数的关系数据库都明显不同于MS Access,它们都有两个截然不同的部分:后端作为数据仓库,前端作为用于数据组件通信的用户界面.这种设计非常巧妙,它并行处理两层编程模型,将数据 层从用户界面中分 ...

  8. 安装ARM调试器

    一.概述 1.调试ARM应用程序的软硬件组成 硬件JTAG/SWD仿真器 Eclipse调试插件 GDB调试客户端 GDB服务器端 JTAG/SWD需要的硬件驱动 2.GNU ARM Eclipse推 ...

  9. Ubuntu下安装RabbbitVCS(图形化svn管理工具)- Ubuntu也有TortoiseSVN

    在Windows下用惯了TortoiseSVN这只小乌龟,到了Ubuntu下很不习惯命令行的SVN,于是经过一番寻找安装了RabbitVCS这款SVN图形化前端工具(官方网站:http://rabbi ...

随机推荐

  1. [hgoi#2019/2/17t1]million

    题目描述 面对格鲁的入侵,小黄人们要组建一支队伍,来抵御进攻,现在有编号为1 至n 的小黄人,任命编号为n 的队长,由其挑选队员,当然编号不是随便编的,每一个编号里都包含一个小黄人的个人信息,现在队长 ...

  2. Internet Explorer 10 administration IE10管理

    http://4sysops.com/archives/internet-explorer-10-administration-part-1-overview/ http://4sysops.com/ ...

  3. codeblocks 输入、输出文件的位置

    codeblocks已经自动地规定了文件位置 另外:有些数据(数据量大)直接复制到exe中执行,会神奇地发生错误,估计是限制了一次粘贴到控制台的数据量.

  4. mac 中vim永久显示行号、开启语法高亮

    步骤1: cp /usr/share/vim/vimrc ~/.vimrc 先复制一份vim配置模板到个人目录下 注:redhat 改成 cp /etc/vimrc ~/.vimrc 步骤2: vi ...

  5. checkbox用图片替换原始样式,并实现同样的功能

    1.结构: <div class="box1"> <input/> <div class="box2"> <img / ...

  6. pycharm git无法使用问题(待解决)

    PyCharm 2017.3.1 (Community Edition)Build #PC-173.3942.36, built on December 14, 2017JRE: 1.8.0_152- ...

  7. 解决编译安装php时报错:Please reinstall the iconv library

    编译安装php7时报错“Please reinstall the iconv library”,也就是让重新安装iconv库.但yum安装又提示“No package libiconv availab ...

  8. 函数和常用模块【day04】:高阶函数(七)

    本节内容 1.介绍 2.具体实用 3.eval()函数 一.介绍 高阶函数:变量可以指向函数,函数的参数能接收变量,那么一个函数就可以接收另一个函数作为参数. 二.具体实用 其实说白了,高阶函数功能就 ...

  9. JAVA-常用集合类型转换例子(基础必备)

    package com.net.xinfang.reflect; import java.util.ArrayList; import java.util.Arrays; import java.ut ...

  10. Study 6 —— while循环

    语法while 条件: 执行代码... 1. #从0打印到100,每循环一次 +1 count = 0 while count <= 100 : print('Loop: ', count) c ...