ubuntu10.x 安装gdb insight
来源:互联网 发布:去掉美颜的软件 编辑:程序博客网 时间:2024/05/21 06:33
操作系统:ubuntu11.04
安装包:insight.6.8-1.tar.bz2
下载地址:ftp://sourceware.org/pub/insight/releases/
安装步骤:
1. sudo tarjxvf insight.6.8-1.tar.bz2
2.sudo ./configure--prefix=/usr/local/arm/arm-linux-insight--target=arm-linux
3. sudomake
4. sudo makeinstall
出错解决:
1.关于i387-tdep.c的报错
解决:sudo vim./gdb/i386-linux-nat.c
在#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
#endif
后加入 #include "i387.tdep.h"
2.类似出错:linux-nat.c:2879:error:ignoringreturn value of 'fgets',declared with attributewarn_unused_result
解决:进入insight-6.8-1/gdb目录,打开Makefile文件搜索-Werror注释掉
(Can be set when configure:--enable-werror=no)
3. configure:error: no termcap library found
解决:缺乏termcap库文件,
sudo apt-getinstall libncurses5-dev
4.安装完毕后,运行出错
yc200@yc200:~/Desktop/insight-6.8$arm-linux-insight
Tk_Init failed:Can't find a usable tk.tcl in the followingdirectories:
/usr/local/arm/2.95.3/share/tk8.4/usr/local/arm/2.95.3/lib/tk8.4 /usr/local/arm/lib/tk8.4/usr/local/arm/2.95.3/library /usr/local/arm/library/usr/local/arm/tk8.4.1/library/usr/local/tk8.4.1/library
/usr/local/arm/2.95.3/share/tk8.4/tk.tcl:no event type or button # or keysym
no event typeor button # or keysym
whileexecuting
"bind Listbox<MouseWheel> {
%W yview scroll[expr {- (%D / 120) * 4}] units
}"
(file"/usr/local/arm/2.95.3/share/tk8.4/listbox.tcl" line182)
invoked fromwithin
"source/usr/local/arm/2.95.3/share/tk8.4/listbox.tcl"
(in namespaceeval "::" script line 1)
invoked fromwithin
"namespace eval:: [list source [file join $::tk_library$file.tcl]]"
(procedure"SourceLibFile" line 2)
invoked fromwithin
"SourceLibFilelistbox"
(in namespaceeval "::tk" script line 4)
invoked fromwithin
"namespace eval::tk {
SourceLibFilebutton
SourceLibFileentry
SourceLibFilelistbox
SourceLibFilemenu
SourceLibFilepanedwindow
SourceLibFile..."
invoked fromwithin
"if{$::tk_library ne ""} {
if {[stringequal $tcl_platform(platform) "macintosh"]} {
proc::tk::SourceLibFile {file} {
if {[catch{
namesp..."
(file"/usr/local/arm/2.95.3/share/tk8.4/tk.tcl" line393)
invoked fromwithin
"source/usr/local/arm/2.95.3/share/tk8.4/tk.tcl"
("uplevel" bodyline 1)
invoked fromwithin
"uplevel #0[list source $file]"
This probablymeans that tk wasn't installed properly.
解决办法:
编译insight-6.8前必须修改insight-6.8的源代码。
1)修改insight-6.8/tk/generic/tk.h
将(line653)
#defineVirtualEvent (LASTEvent)
#defineActivateNotify (LASTEvent + 1)
#defineDeactivateNotify (LASTEvent + 2)
#defineMouseWheelEvent (LASTEvent + 3)
#defineTK_LASTEVENT (LASTEvent + 4)
改为:
#defineVirtualEvent (MappingNotify)
#defineActivateNotify (MappingNotify + 1)
#defineDeactivateNotify (MappingNotify + 2)
#defineMouseWheelEvent (MappingNotify + 3)
#defineTK_LASTEVENT (MappingNotify + 4)
并将随后的#defineTK_LASTEVENT (LASTEvent + 4)删除(line 661附近)
2)修改insight-6.8/tk/generic/tkBind.c
在line 586和line587之间增加
#ifdefGenericEvent
0,
#endif
/////////////////////
错误信息:
qiang@LinuxSir:~$ sudo arm-elf-insight
Tk_Init failed: Can't find a usable tk.tcl in the followingdirectories:
/usr/local/share/tk8.4 /usr/local/lib/tk8.4 /usr/lib/tk8.4/usr/local/library /usr/library /usr/tk8.4.1/library/tk8.4.1/library
/usr/local/share/tk8.4/tk.tcl: no event type or button # orkeysym
no event type or button # or keysym
whileexecuting
"bind Listbox <MouseWheel> {
%W yviewscroll [expr {- (%D / 120) * 4}] units
}"
(file"/usr/local/share/tk8.4/listbox.tcl" line 182)
invoked fromwithin
"source /usr/local/share/tk8.4/listbox.tcl"
(innamespace eval "::" script line 1)
invoked fromwithin
"namespace eval :: [list source [file join $::tk_library$file.tcl]]"
(procedure"SourceLibFile" line 2)
invoked fromwithin
"SourceLibFile listbox"
(innamespace eval "::tk" script line 4)
invoked fromwithin
"namespace eval ::tk {
SourceLibFile button
SourceLibFile entry
SourceLibFile listbox
SourceLibFile menu
SourceLibFile panedwindow
SourceLibFile ..."
invoked fromwithin
"if {$::tk_library ne ""} {
if {[stringequal $tcl_platform(platform) "macintosh"]} {
proc::tk::SourceLibFile {file} {
if {[catch{
namesp..."
(file"/usr/local/share/tk8.4/tk.tcl" line 393)
invoked fromwithin
"source /usr/local/share/tk8.4/tk.tcl"
("uplevel"body line 1)
invoked fromwithin
"uplevel #0 [list source $file]"
This probably means that tk wasn't installed properly.
编译insight-6.8前必须修改insight-6.8的源代码。
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
0,
#endif
经测试,已经可以正常启动arm-linux-insight
补充一下:我安装的tk8.5和tcl8.5
错误:
cc1: warnings being treated as errors
.././gdb/cli/cli-cmds.c: In function ‘pwd_command’:
.././gdb/cli/cli-cmds.c:323: error: ignoring return value of‘getcwd’, declared with attribute warn_unused_result
make[2]: *** [cli-cmds.o] 错误 1
make[2]:正在离开目录 `/home/qiang/tools/insight-6.8-1/gdb'
make[1]: *** [all-gdb] 错误 2
make[1]:正在离开目录 `/home/qiang/tools/insight-6.8-1'
make: *** [all] 错误 2
解决方案:
方法1.修改源代码,
linux-nat.c:2879:error:ignoring return value of 'fgets',declaredwith attribute warn_unused_result
老代码
fgets(buffer, MAXPATHLEN, procfile);
解决的方法是
char* temp_p = fgets(buffer, MAXPATHLEN, procfile);
类似的问题还有几个,基本上都是gdb的问题,照着解决就行了,我就不一个个说了。
方法2.进入insight-6.8-1/gdb目录,打开Makefile文件搜索-Werror
老代码
WERROR_CFLAGS = -Werror
新代码
WERROR_CFLAGS = #-Werror
这2个办法都可以通过编译,就可以使用insight了。
/////////////////////////////
下载地址:ftp://sourceware.org/pub/insight/releases/
1.configure:error: no termcap library found
解决:缺乏termcap库文件,
sudo apt-getinstall libncurses5-dev
2.类似出错:linux-nat.c:2879:error:ignoringreturn value of 'fgets',declared with attributewarn_unused_result
解决:进入insight-6.8-1/gdb目录,打开Makefile文件搜索-Werror注释掉
3.
1)修改insight-6.8/tk/generic/tk.h
将(line653)
#defineVirtualEvent (LASTEvent)
#defineActivateNotify (LASTEvent + 1)
#defineDeactivateNotify (LASTEvent + 2)
#defineMouseWheelEvent (LASTEvent + 3)
#defineTK_LASTEVENT (LASTEvent + 4)
改为:
#defineVirtualEvent (MappingNotify)
#defineActivateNotify (MappingNotify + 1)
#defineDeactivateNotify (MappingNotify + 2)
#defineMouseWheelEvent (MappingNotify + 3)
#defineTK_LASTEVENT (MappingNotify + 4)
并将随后的#defineTK_LASTEVENT (LASTEvent + 4)删除(line 661附近)
2)修改insight-6.8/tk/generic/tkBind.c
在line 586和line587之间增加
#ifdefGenericEvent
否则运行会报错:
Tk_Init failed:Can't find a usable tk.tcl in the followingdirectories:
/usr/local/arm/2.95.3/share/tk8.4/usr/local/arm/2.95.3/lib/tk8.4 /usr/local/arm/lib/tk8.4/usr/local/arm/2.95.3/library /usr/local/arm/library/usr/local/arm/tk8.4.1/library/usr/local/tk8.4.1/library
/usr/local/arm/2.95.3/share/tk8.4/tk.tcl:no event type or button # or keysym
no event typeor button # or keysym
whileexecuting
"bind Listbox<MouseWheel> {
%W yview scroll[expr {- (%D / 120) * 4}] units
}"
(file"/usr/local/arm/2.95.3/share/tk8.4/listbox.tcl" line182)
invoked fromwithin
"source/usr/local/arm/2.95.3/share/tk8.4/listbox.tcl"
(in namespaceeval "::" script line 1)
invoked fromwithin
"namespace eval:: [list source [file join $::tk_library$file.tcl]]"
(procedure"SourceLibFile" line 2)
invoked fromwithin
"SourceLibFilelistbox"
(in namespaceeval "::tk" script line 4)
invoked fromwithin
"namespace eval::tk {
SourceLibFilebutton
SourceLibFileentry
SourceLibFilelistbox
SourceLibFilemenu
SourceLibFilepanedwindow
SourceLibFile..."
invoked fromwithin
"if{$::tk_library ne ""} {
if {[stringequal $tcl_platform(platform) "macintosh"]} {
proc::tk::SourceLibFile {file} {
if {[catch{
namesp..."
(file"/usr/local/arm/2.95.3/share/tk8.4/tk.tcl" line393)
invoked fromwithin
"source/usr/local/arm/2.95.3/share/tk8.4/tk.tcl"
("uplevel" bodyline 1)
invoked fromwithin
"uplevel #0[list source $file]"
====
http://blog.sina.com.cn/s/blog_6e228288010118yo.html
- ubuntu10.x 安装gdb insight
- 安装 gdb insight
- 安装gdb insight(6.8.1)
- 安装gdb6.8 insight6.8 gdb insight
- [Ubuntu]: Ubuntu当中安装insight GDB前端
- [Ubuntu]: 安装使用insight GDB前端
- insight +gdb
- ubuntu10.10下安装wine和source insight
- Mac OS X 安装gdb
- 编译安装gdb+insight和gdbserver远程调试
- 编译安装gdb+insight和gdbserver远程调试
- 编译安装gdb+insight和gdbserver远程调试arm
- 编译安装gdb+insight和gdbserver远程调试
- ubuntu下成功安装gdb图形界面调试工具insight
- ubuntu10.10 wine+source insight
- insight - gdb图形界面
- 在Ubuntu10.04下安装insight遇到的问题及解决办法
- Mac OS X 10.10 安装 gdb
- ACE学习笔记(三)
- Linux系统工程师的必备素质
- java.lang.NoSuchMethodException: $Proxy
- Ext Templete1 201208151455
- asp.net 生成二维码代码支持中英文
- ubuntu10.x 安装gdb insight
- 文件保护机制--权限
- vim 参考手册
- [线段数]hdu 4366 Successor
- android系统硬件OpenGL 3D 移植
- .NET:关于byte数组在用StreamWriter文件写出后出现多余字符的解决方法及VS方案文件图标显示问题
- 一个小工具unix2dos的学习之旅
- 【iOS(译)】游戏引擎剖析
- Firefox使用代理,不用登陆客户端便可免费上网