Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7453
  • 博文数量: 1
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 14
  • 用 户 组: 普通用户
  • 注册时间: 2014-10-06 09:59
文章分类
文章存档

2016年(1)

我的朋友
最近访客

分类: LINUX

2016-09-20 05:50:57

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了。


阅读(1693) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:没有了

给主人留下些什么吧!~~