免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: prc
打印 上一主题 下一主题

[其他] 帮助你阅读内核源码 [复制链接]

论坛徽章:
0
1 [报告]
发表于 2015-12-10 10:17 |显示全部楼层
../codeless/y-Make --yz-cc=gcc --yz-postprocess=cl

我使用上面的命令处理zeromq,出现这样的异常:

../libtool: line 1:  4300 Segmentation fault      (core dumped) /home/bm186/codeless/cl.exe --yz-no-output --yz-save-dep=/home/bm186/zeromq-wangyl11/cl/depends.txt --yz-save-cl=/home/bm186/zeromq-wangyl11/cl/commands.txt --yz-save-condvals=/home/bm186/zeromq-wangyl11/cl/condvals.txt --yz-top-dir=/home/bm186/zeromq-wangyl11 --yz-cc=gcc --yz-verbose=0 "$@"

我的系统环境是
186_bm186%uname -a
Linux rhel13160 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

楼主见过这个错误吗?

论坛徽章:
0
2 [报告]
发表于 2015-12-10 12:51 |显示全部楼层
回复 9# prc
github.com/zeromq/zeromq4-1  (抱歉没有URL权限)
这是官方版本的下载地址,但是我自己测试的是4.0.4版本代码
另外,我把gcc改成g++就不会core了,但是却没有发现任何结果。

论坛徽章:
0
3 [报告]
发表于 2015-12-25 12:51 |显示全部楼层
楼主,我这里也是同样的BUG
hnwyllmm@ubuntu:~/linux-2.6.32.63$ uname -a
Linux ubuntu 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
使用的是Ubuntu 14.04 Server版

hnwyllmm@ubuntu:~/linux-2.6.32.63$ file core
core: ELF 64-bit LSB  core file x86-64, version 1 (SYSV), SVR4-style, from '/home/hnwyllmm/codeless/cl.exe --yz-no-output --yz-save-dep=/home/hnwyllmm/linu'
  1. hnwyllmm@ubuntu:~/linux-2.6.32.63$ gdb ../codeless/cl.exe core
  2. GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
  3. Copyright (C) 2014 Free Software Foundation, Inc.
  4. License GPLv3+: GNU GPL version 3 or later <>
  5. This is free software: you are free to change and redistribute it.
  6. There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  7. and "show warranty" for details.
  8. This GDB was configured as "x86_64-linux-gnu".
  9. Type "show configuration" for configuration details.
  10. For bug reporting instructions, please see:
  11. >.
  12. Find the GDB manual and other documentation resources online at:
  13. <>.
  14. For help, type "help".
  15. Type "apropos word" to search for commands related to "word"...
  16. Reading symbols from ../codeless/cl.exe...done.
  17. [New LWP 5458]
  18. [Thread debugging using libthread_db enabled]
  19. Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
  20. Core was generated by `/home/hnwyllmm/codeless/cl.exe --yz-no-output --yz-save-dep=/home/hnwyllmm/linu'.
  21. Program terminated with signal SIGSEGV, Segmentation fault.
  22. #0  __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:66
  23. 66      ../nptl/pthread_mutex_lock.c: No such file or directory.
  24. (gdb) bt
  25. #0  __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:66
  26. #1  0x0000000000416fe1 in ipsc_acc_bytes (sc=0x0, index=0, val=512) at ../common/ip_sc.c:54
  27. #2  0x0000000000404066 in OsFileWriter::Write (this=0x12b1400, buf=0x12b1c18, count=<optimized out>) at FileWriter.cpp:106
  28. #3  0x0000000000402d8f in save_command_line (filename=..., my_args=..., cc_args=..., host_cc=...) at startup.cpp:86
  29. #4  main (argc=<optimized out>, argv=<optimized out>) at startup.cpp:215
  30. (gdb)
复制代码
  1. (gdb) f 1
  2. #1  0x0000000000416fe1 in ipsc_acc_bytes (sc=0x0, index=0, val=512) at ../common/ip_sc.c:54
  3. 54          pthread_mutex_lock(&sc->lock);
  4. (gdb) info local
  5. No locals.
  6. (gdb) info reg
  7. rax            0x0      0
  8. rbx            0x0      0
  9. rcx            0xffffffffffffffff       -1
  10. rdx            0x200    512
  11. rsi            0x0      0
  12. rdi            0x0      0
  13. rbp            0x200    0x200
  14. rsp            0x7fff0d77cf00   0x7fff0d77cf00
  15. r8             0x0      0
  16. r9             0x1      1
  17. r10            0x7fff0d77ccc0   140733419343040
  18. r11            0x2b3edc166410   47548980421648
  19. r12            0x0      0
  20. r13            0x12b1c18        19602456
  21. r14            0x0      0
  22. r15            0x0      0
  23. rip            0x416fe1 0x416fe1 <ipsc_acc_bytes+17>
  24. eflags         0x10206  [ PF IF RF ]
  25. cs             0x33     51
  26. ss             0x2b     43
  27. ds             0x0      0
  28. es             0x0      0
  29. fs             0x0      0
  30. gs             0x0      0
  31. (gdb)
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP