Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2116766
  • 博文数量: 438
  • 博客积分: 3871
  • 博客等级: 中校
  • 技术积分: 6075
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-10 00:11
个人简介

邮箱: wangcong02345@163.com

文章分类

全部博文(438)

文章存档

2017年(15)

2016年(119)

2015年(91)

2014年(62)

2013年(56)

2012年(79)

2011年(16)

分类: LINUX

2016-06-30 18:51:37

1.下载insight的源码

下载insight-6.8-1a.tar.bz2
2.ubuntu14.04下编译出错及解决
  1. a.出错1 
  2. bfd.texinfo:326: unknown command `colophon'
  3. bfd.texinfo:337: unknown command `cygnus'
  4. 查到了这个文章:http://permalink.gmane.org/gmane.linux.lfs.devel/13912
  5. sed -i -e 's/ <at> colophon/ <at> <at> colophon/' \
  6.  -e 's/doc <at> cygnus.com/doc <at> <at> cygnus.com/' bfd/doc/bfd.texinfo
  7.  竟然是!!
  8. 正确的是这个:  
  9.  sed -i -e 's/@colophon/@@colophon/' \
  10.        -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo

  11. b.出错2
  12. ./elf.texi:11: raising the section level of @subsubsection which is too low
  13. cong@msi:/work/ffmpeg/insight/insight-6.8-1$ cp bfd/doc/elf.texi bfd/doc/elf.texi_bak
  14. cong@msi:/work/ffmpeg/insight/insight-6.8-1$ sed -i 's/subsubsection/subsection/' ./bfd/doc/elf.texi
  15. 这就是一个拼写错误,我承认是瞎蒙的,但是可以编过去了。

  16. c.出错3
  17. elf64-x86-64.c:2364:16: error: variable 'warned' set but not used [-Werror=unused-but-set-variablebfd_boolean warned;
  18. cong@msi:/work/ffmpeg/insight/insight-6.8-1$ ./configure --disable-werror

  19. d.出错4
  20. linux-nat.h:63:18: error: field ‘siginfo’ has incomplete type struct siginfo siginfo;
  21.                   ^
  22. In file included from linux-nat.c:32:0:
  23. linux-nat.h:63:18: error: field ‘siginfo’ has incomplete type
  24.    struct siginfo siginfo;
  25. 解决方法: 把所有的 struct siginfo替换为 struct siginfo_t, 脚本如下:
  26. #!/bin/sh
  27. for c_file in `find . -name '*.c' -o -name '*.h'`
  28. do
  29.     sed -i 's/struct siginfo/siginfo_t/' $c_file
  30. done
3. 使用insight
3.1 调试时报错
  1. 直接insight ./hello时会报错:
  2. wrong version in compilation unit header (is 4, should be 2)
  3. 这需要在被调试的程序的Makefile加上:
  4. CFLAGS+= -gdwarf-2 -gstrict-dwarf
  5. 参考: http://ju.outofmemory.cn/entry/94917
3.2 TMD还有问题
  1. cong@msi:/work/ffmpeg/test/jpeg/jpeg6b$ insight ./mytest
  2. BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37
  3. BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail elf64-x86-64.c:278
  4. BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37
  5. BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail elf64-x86-64.c:278
  6. BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37
  7. BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail elf64-x86-64.c:278
  8. BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37
  9. BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail elf64-x86-64.c:278
  10. BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37
  11. BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail elf64-x86-64.c:278
  12. next
重新编译gdb也解决不了。算了,放弃了,世上无难事,只要肯放弃。换DDD或cgdb了。


阅读(3076) | 评论(2) | 转发(1) |
给主人留下些什么吧!~~

wangcong023452016-09-20 09:55:08

xhyysh:wangcong,您好,我现在编译insight也出现同样的问题了,请问你这个问题最终解了吗?

这个问题没有解决,后来我直接用cgdb了,而且直接安装就可以用,非常方便,建议用这个cgdb.

回复 | 举报

xhyysh2016-09-19 22:14:26

wangcong,您好,我现在编译insight也出现同样的问题了,请问你这个问题最终解了吗?