insight是在Linux下一个比较好用的GDB的前端
insight首页:http://sourceware.org/insight/index.php
在这里下载源码:insight-6.8.tar.bz2 ,并解压
tar jxvf insight-6.8a.tar.bz2
进入源码目录,在编译之前要修改几个文件:
1)修改insight-6.8/tk/generic/tk.h
将(line 653)
#define VirtualEvent (LASTEvent) #define ActivateNotify (LASTEvent + 1) #define DeactivateNotify (LASTEvent + 2) #define MouseWheelEvent (LASTEvent + 3) #define TK_LASTEVENT (LASTEvent + 4)
改为:
#define VirtualEvent (MappingNotify) #define ActivateNotify (MappingNotify + 1) #define DeactivateNotify (MappingNotify + 2) #define MouseWheelEvent (MappingNotify + 3) #define TK_LASTEVENT (MappingNotify + 4)
并将随后的#define TK_LASTEVENT (LASTEvent + 4)删除(line 661附近)
2)修改insight-6.8/tk/generic/tkBind.c
在line 586和line 587之间增加
#ifdef GenericEvent /* GenericEvent */ 0, #endif
然后按照以下步骤安装就行了:
1. sudo apt-get install libx11-dev
2. sudo apt-get install libncurses5-dev
3. tar -xjvf insight-6.8-1.tar.bz2
4. cd insight-6.8-1/
5. ./configure –disable-werror
6. sudo make
7. sudo make install
可能还需要 sudo apt-get install tk
原文地址:http://www.cnblogs.com/giraffe/p/3188898.html