Chinaunix首页 | 论坛 | 博客
  • 博客访问: 529445
  • 博文数量: 142
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1452
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-12 16:28
文章分类

全部博文(142)

文章存档

2016年(10)

2015年(60)

2014年(72)

我的朋友

分类: LINUX

2014-12-31 11:10:54

solib-absolute-prefix 和solib-search-path是 gdb比较常用的选项,用来设置符号文件的位置。

那么,它们有什么区别呢?

solib-absolute-prefix设置的是被搜索文件路径的前缀,solib-search-path设置的是被搜索文件的路径。

solib-search-path可以有多个路径,中间按用:隔开, solib-absolute-prefix的值只能有一个。
假设库的绝对路径如下:
/images/rootfs_tmp/opt/ah/lib/libah_event.so
在GDB下显示的名称如下:
(gdb) info sharedlib    
        No /opt/ah/lib/libah_event.so

那么GDB要索引它,可以通过以下方式:
1.set solib-absolute-prefix /images/rootfs_tmp
2.set solib-search-path /images/rootfs_tmp/opt/ah/lib/

GDB 默认的solib-absolute-prefix : 交叉编译器库路径
       默认的solib-search-path:为空
可以通过show solib-absolute-prefix和show solib-search-path来查看对应的设置信息:

点击(此处)折叠或打开

  1. gwwu@hz-dev2.aerohive.com:~/codes/cfd_896/build_AH-APPLIANCE-1>x86_64-aerohive-linux-gnu-gdb
  2. GNU gdb 6.8
  3. Copyright (C) 2008 Free Software Foundation, Inc.
  4. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  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 "--host=x86_64-build_unknown-linux-gnu --target=x86_64-aerohive-linux-gnu".
  9. (gdb) show solib-absolute-prefix
  10. The current system root is "/eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot".
  11. (gdb) show solib-search-path
  12. The search path for loading non-absolute shared library symbol files is .
  13. (gdb)


举例说明:
1.修改solib-search-path

点击(此处)折叠或打开

  1. gwwu@hz-dev2.aerohive.com:~/codes/cfd_896/build_AH-APPLIANCE-1>x86_64-aerohive-linux-gnu-gdb -----------调用GDB
  2. GNU gdb 6.8
  3. Copyright (C) 2008 Free Software Foundation, Inc.
  4. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  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 "--host=x86_64-build_unknown-linux-gnu --target=x86_64-aerohive-linux-gnu".
  9. (gdb) info sharedlib   ---查看共享lib,此时没有任何lib
  10. No shared libraries loaded at this time.
  11. (gdb) file ./images/rootfs_tmp/opt/ah/bin/dhcpd  ---通过file命令载入可执行命令
  12. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/bin/dhcpd...done.
  13. (gdb) core-file ../dhcpd_pid1082_sig6_time1412177643.core  -----通过core-file命令导入core文件
  14. warning: exec file is newer than core file.
  15. warning: Can't read pathname for load map: Input/output error.
  16. Error while mapping shared library sections:
  17. /opt/ah/lib/libah_event.so: No such file or directory.
  18. Error while mapping shared library sections:
  19. /opt/ah/lib/libah_mpi.so: No such file or directory.
  20. Error while mapping shared library sections:
  21. /opt/ah/lib/libah_sys.so: No such file or directory.
  22. Error while mapping shared library sections:
  23. /opt/ah/lib/libah.so: No such file or directory.
  24. Error while mapping shared library sections:
  25. /opt/ah/lib/libah_tpa.so: No such file or directory.
  26. Error while mapping shared library sections:
  27. /opt/ah/lib/libah_dhcp.so: No such file or directory.
  28. Error while mapping shared library sections:
  29. /opt/ah/lib/libah_dhcp_db.so: No such file or directory.
  30. Error while mapping shared library sections:
  31. /opt/ah/lib/libah_top.so: No such file or directory.
  32. Error while mapping shared library sections:
  33. /opt/ah/lib/libgdbm.so.3: No such file or directory.
  34. Error while mapping shared library sections:
  35. /opt/ah/lib/libah_db.so: No such file or directory.
  36. Error while mapping shared library sections:
  37. /opt/ah/lib/libah_dcd.so: No such file or directory.
  38. Error while mapping shared library sections:
  39. /opt/ah/lib/libah_cli.so: No such file or directory.
  40. Symbol file not found for /opt/ah/lib/libah_event.so
  41. Symbol file not found for /opt/ah/lib/libah_mpi.so
  42. Symbol file not found for /opt/ah/lib/libah_sys.so
  43. Symbol file not found for /opt/ah/lib/libah.so
  44. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0...done.
  45. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  46. Symbol file not found for /opt/ah/lib/libah_tpa.so
  47. Symbol file not found for /opt/ah/lib/libah_dhcp.so
  48. Symbol file not found for /opt/ah/lib/libah_dhcp_db.so
  49. Symbol file not found for /opt/ah/lib/libah_top.so
  50. Symbol file not found for /opt/ah/lib/libgdbm.so.3
  51. Symbol file not found for /opt/ah/lib/libah_db.so
  52. Symbol file not found for /opt/ah/lib/libah_dcd.so
  53. Symbol file not found for /opt/ah/lib/libah_cli.so
  54. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6...done.
  55. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  56. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/ld-linux-x86-64.so.2...done.
  57. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib64/ld-linux-x86-64.so.2
  58. Core was generated by `/opt/ah/bin/dhcpd'.
  59. Program terminated with signal 6, Aborted.
  60. [New process 1082]
  61. [New process 1155]
  62. [New process 1158]
  63. [New process 1157]
  64. [New process 1156]
  65. #0 0x00007ffa01b7a062 in select () from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  66. (gdb) bt    ---------使用bt查看堆栈信息,发现很多??,这个表明符号表没有正确导入
  67. #0 0x00007ffa01b7a062 in select () from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  68. #1 0x00007ffa030d6226 in ?? ()
  69. #2 0x000000000060c280 in ?? ()
  70. #3 0x00007fff31dce5a0 in ?? ()
  71. #4 0x000000000060c230 in ?? ()
  72. #5 0x05088c0a04088c0a in ?? ()
  73. #6 0x0000100000000010 in ?? ()
  74. #7 0x00000000542c1eeb in ?? ()
  75. #8 0x00000000000062d5 in ?? ()
  76. #9 0x00000000000ba44f in ?? ()
  77. #10 0x0000000000080000 in ?? ()
  78. #11 0x0000000000000000 in ?? ()
  79. (gdb) info sharedlib    -------使用info sharedlib查看共享库的导入情况,发现很多共享库都不存在。
  80. From To Syms Read Shared Object Library
  81.                                         No /opt/ah/lib/libah_event.so
  82.                                         No /opt/ah/lib/libah_mpi.so
  83.                                         No /opt/ah/lib/libah_sys.so
  84.                                         No /opt/ah/lib/libah.so
  85. 0x00007ffa02eb2270 0x00007ffa02ebcb08 Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  86.                                         No /opt/ah/lib/libah_tpa.so
  87.                                         No /opt/ah/lib/libah_dhcp.so
  88.                                         No /opt/ah/lib/libah_dhcp_db.so
  89.                                         No /opt/ah/lib/libah_top.so
  90.                                         No /opt/ah/lib/libgdbm.so.3
  91.                                         No /opt/ah/lib/libah_db.so
  92.                                         No /opt/ah/lib/libah_dcd.so
  93.                                         No /opt/ah/lib/libah_cli.so
  94. 0x00007ffa01ad61b0 0x00007ffa01bb4c6c Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  95. 0x00007ffa03904ac0 0x00007ffa0391a8a4 Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib64/ld-linux-x86-64.so.2
  96. (gdb) set solib-search-path ./images/rootfs_tmp/opt/ah/lib/    ----------通过设置solib-search-path导入共享库
  97. warning: Can't read pathname for load map: Input/output error.
  98. Error while mapping shared library sections:
  99. /opt/ah/lib/libgdbm.so.3: No such file or directory.
  100. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_event.so...done.
  101. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_event.so
  102. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_mpi.so...done.
  103. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_mpi.so
  104. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_sys.so...done.
  105. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_sys.so
  106. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah.so...done.
  107. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah.so
  108. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0...done.
  109. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  110. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_tpa.so...done.
  111. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_tpa.so
  112. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dhcp.so...done.
  113. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dhcp.so
  114. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dhcp_db.so...done.
  115. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dhcp_db.so
  116. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_top.so...done.
  117. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_top.so
  118. Symbol file not found for /opt/ah/lib/libgdbm.so.3
  119. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_db.so...done.
  120. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_db.so
  121. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dcd.so...done.
  122. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dcd.so
  123. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_cli.so...done.
  124. Loaded symbols for /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_cli.so
  125. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6...done.
  126. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  127. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/ld-linux-x86-64.so.2...done.
  128. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib64/ld-linux-x86-64.so.2
  129. (gdb) info sharedlib   -----------再次查看共享库信息,此时基本上的共享库都已经存在了
  130. warning: Can't read pathname for load map: Input/output error.
  131. From To Syms Read Shared Object Library
  132. 0x00007ffa036f2e70 0x00007ffa036fe674 Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_event.so
  133. 0x00007ffa034e7180 0x00007ffa034ee7fc Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_mpi.so
  134. 0x00007ffa032dfa20 0x00007ffa032e39e8 Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_sys.so
  135. 0x00007ffa030cc020 0x00007ffa030d8228 Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah.so
  136. 0x00007ffa02eb2270 0x00007ffa02ebcb08 Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  137. 0x00007ffa02c90fe0 0x00007ffa02ca4fd0 Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_tpa.so
  138. 0x00007ffa02a80d90 0x00007ffa02a867f4 Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dhcp.so
  139. 0x00007ffa0287b040 0x00007ffa0287bff0 Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dhcp_db.so
  140. 0x00007ffa02677058 0x00007ffa026785c4 Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_top.so
  141.                                         No /opt/ah/lib/libgdbm.so.3
  142. 0x00007ffa0226bd28 0x00007ffa0226c788 Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_db.so
  143. 0x00007ffa0201b2f8 0x00007ffa02058b9c Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dcd.so
  144. 0x00007ffa01e048a0 0x00007ffa01e0ab68 Yes /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_cli.so
  145. 0x00007ffa01ad61b0 0x00007ffa01bb4c6c Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  146. 0x00007ffa03904ac0 0x00007ffa0391a8a4 Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib64/ld-linux-x86-64.so.2
  147. (gdb) bt  ------再次调用bt获取堆栈信息
  148. #0 0x00007ffa01b7a062 in select () from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  149. #1 0x00007ffa030d6226 in ah_arpping (yiaddr=0, ip=1412177643, smac=0x100000000010 <Address 0x100000000010 out of bounds>,
  150.     dmac=0x5088c0a04088c0a <Address 0x5088c0a04088c0a out of bounds>, interface=0x60c230 "郳034A鏒?) at ah_arpping.c:119
  151. #2 0x0000000000406bcb in check_ip (addr=84446218) at leases.c:255
  152. #3 0x0000000000406d7e in find_address (check_expired=0) at leases.c:307
  153. #4 0x0000000000407882 in sendOffer (oldpacket=0x7fff31dcebd0) at serverpacket.c:211
  154. #5 0x00000000004056cd in deal_packet (fd=6) at dhcpd.c:313
  155. #6 0x0000000000406245 in main (argc=1, argv=0x7fff31dcf2b8) at dhcpd.c:614
  156. (gdb) info threads -----查看线程数
  157.   5 process 1156 0x00007ffa01b7a062 in select ()
  158.    from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  159.   4 process 1157 0x00007ffa01b7a062 in select ()
  160.    from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  161.   3 process 1158 0x00007ffa02eb9d8c in __lll_lock_wait ()
  162.    from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  163.   2 process 1155 0x00007ffa01b7a062 in select ()
  164.    from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  165. * 1 process 1082 0x00007ffa01b7a062 in select ()
  166.    from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  167. (gdb) thread 3 -----切换到线程3
  168. [Switching to thread 3 (process 1158)]#0 0x00007ffa02eb9d8c in __lll_lock_wait ()
  169.    from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  170. (gdb) bt       -----查看线程3的堆栈信息
  171. #0 0x00007ffa02eb9d8c in __lll_lock_wait ()
  172.    from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  173. #1 0x00007ffa02eb58dd in _L_lock_52 () from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  174. #2 0x00007ffa02eb520c in pthread_mutex_lock ()
  175.    from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  176. #3 0x0000000000404009 in ah_dhcps_proc_event (event_id=AH_EVENT_DHCPS_CFG_CHG, size=2400, data=0x62ec68) at ah_dhcps_event.c:661
  177. #4 0x00007ffa036fdc9c in ah_event_process_msg (buf=0x62ec60 "\226
1.修改solib-absolute-prefix
当然也可以通过修改solib-absolute-prefix来解决,但是由于原来的lib可能会对absolute-prefix有依赖,所以修改solib-absolute-prefix时候还是要慎重。

点击(此处)折叠或打开

  1. gwwu@hz-dev2.aerohive.com:~/codes/cfd_896/build_AH-APPLIANCE-1>x86_64-aerohive-linux-gnu-gdb -----------调用GDB
  2. GNU gdb 6.8
  3. Copyright (C) 2008 Free Software Foundation, Inc.
  4. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  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 "--host=x86_64-build_unknown-linux-gnu --target=x86_64-aerohive-linux-gnu".
  9. (gdb) info sharedlib---查看共享lib,此时没有任何lib
  10. No shared libraries loaded at this time.
  11. (gdb) file ./images/rootfs_tmp/opt/ah/bin/dhcpd ---通过file命令载入可执行命令
  12. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/bin/dhcpd...done.
  13. (gdb) core-file ../dhcpd_pid1082_sig6_time1412177643.core-----通过core-file命令导入core文件
  14. warning: exec file is newer than core file.
  15. warning: Can't read pathname for load map: Input/output error.
  16. Error while mapping shared library sections:
  17. /opt/ah/lib/libah_event.so: No such file or directory.
  18. Error while mapping shared library sections:
  19. /opt/ah/lib/libah_mpi.so: No such file or directory.
  20. Error while mapping shared library sections:
  21. /opt/ah/lib/libah_sys.so: No such file or directory.
  22. Error while mapping shared library sections:
  23. /opt/ah/lib/libah.so: No such file or directory.
  24. Error while mapping shared library sections:
  25. /opt/ah/lib/libah_tpa.so: No such file or directory.
  26. Error while mapping shared library sections:
  27. /opt/ah/lib/libah_dhcp.so: No such file or directory.
  28. Error while mapping shared library sections:
  29. /opt/ah/lib/libah_dhcp_db.so: No such file or directory.
  30. Error while mapping shared library sections:
  31. /opt/ah/lib/libah_top.so: No such file or directory.
  32. Error while mapping shared library sections:
  33. /opt/ah/lib/libgdbm.so.3: No such file or directory.
  34. Error while mapping shared library sections:
  35. /opt/ah/lib/libah_db.so: No such file or directory.
  36. Error while mapping shared library sections:
  37. /opt/ah/lib/libah_dcd.so: No such file or directory.
  38. Error while mapping shared library sections:
  39. /opt/ah/lib/libah_cli.so: No such file or directory.
  40. Symbol file not found for /opt/ah/lib/libah_event.so
  41. Symbol file not found for /opt/ah/lib/libah_mpi.so
  42. Symbol file not found for /opt/ah/lib/libah_sys.so
  43. Symbol file not found for /opt/ah/lib/libah.so
  44. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0...done.
  45. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  46. Symbol file not found for /opt/ah/lib/libah_tpa.so
  47. Symbol file not found for /opt/ah/lib/libah_dhcp.so
  48. Symbol file not found for /opt/ah/lib/libah_dhcp_db.so
  49. Symbol file not found for /opt/ah/lib/libah_top.so
  50. Symbol file not found for /opt/ah/lib/libgdbm.so.3
  51. Symbol file not found for /opt/ah/lib/libah_db.so
  52. Symbol file not found for /opt/ah/lib/libah_dcd.so
  53. Symbol file not found for /opt/ah/lib/libah_cli.so
  54. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6...done.
  55. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  56. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/ld-linux-x86-64.so.2...done.
  57. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib64/ld-linux-x86-64.so.2
  58. Core was generated by `/opt/ah/bin/dhcpd'.
  59. Program terminated with signal 6, Aborted.
  60. [New process 1082]
  61. [New process 1155]
  62. [New process 1158]
  63. [New process 1157]
  64. [New process 1156]
  65. #0 0x00007ffa01b7a062 in select () from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  66. (gdb) bt---------使用bt查看堆栈信息,发现很多??,这个表明符号表没有正确导入
  67. #0 0x00007ffa01b7a062 in select () from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  68. #1 0x00007ffa030d6226 in ?? ()
  69. #2 0x000000000060c280 in ?? ()
  70. #3 0x00007fff31dce5a0 in ?? ()
  71. #4 0x000000000060c230 in ?? ()
  72. #5 0x05088c0a04088c0a in ?? ()
  73. #6 0x0000100000000010 in ?? ()
  74. #7 0x00000000542c1eeb in ?? ()
  75. #8 0x00000000000062d5 in ?? ()
  76. #9 0x00000000000ba44f in ?? ()
  77. #10 0x0000000000080000 in ?? ()
  78. #11 0x0000000000000000 in ?? ()
  79. (gdb) info sharedlib-------使用info sharedlib查看共享库的导入情况,发现很多共享库都不存在。
  80. From To Syms Read Shared Object Library
  81.                                         No /opt/ah/lib/libah_event.so
  82.                                         No /opt/ah/lib/libah_mpi.so
  83.                                         No /opt/ah/lib/libah_sys.so
  84.                                         No /opt/ah/lib/libah.so
  85. 0x00007ffa02eb2270 0x00007ffa02ebcb08 Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  86.                                         No /opt/ah/lib/libah_tpa.so
  87.                                         No /opt/ah/lib/libah_dhcp.so
  88.                                         No /opt/ah/lib/libah_dhcp_db.so
  89.                                         No /opt/ah/lib/libah_top.so
  90.                                         No /opt/ah/lib/libgdbm.so.3
  91.                                         No /opt/ah/lib/libah_db.so
  92.                                         No /opt/ah/lib/libah_dcd.so
  93.                                         No /opt/ah/lib/libah_cli.so
  94. 0x00007ffa01ad61b0 0x00007ffa01bb4c6c Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  95. 0x00007ffa03904ac0 0x00007ffa0391a8a4 Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib64/ld-linux-x86-64.so.2
  96. (gdb) set solib-absolute-prefix ./images/rootfs_tmp/  ---修改solib-absolute-prefix
  97. warning: Can't read pathname for load map: Input/output error.
  98. Error while mapping shared library sections:
  99. /lib/libpthread.so.0: No such file or directory.
  100. Error while mapping shared library sections:
  101. /opt/ah/lib/libgdbm.so.3: No such file or directory.
  102. Error while mapping shared library sections:
  103. /lib/libc.so.6: No such file or directory.
  104. Error while mapping shared library sections:
  105. /lib64/ld-linux-x86-64.so.2: No such file or directory.
  106. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_event.so...done.
  107. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_event.so
  108. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_mpi.so...done.
  109. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_mpi.so
  110. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_sys.so...done.
  111. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_sys.so
  112. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah.so...done.
  113. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah.so
  114. Symbol file not found for /lib/libpthread.so.0
  115. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_tpa.so...done.
  116. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_tpa.so
  117. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dhcp.so...done.
  118. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_dhcp.so
  119. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dhcp_db.so...done.
  120. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_dhcp_db.so
  121. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_top.so...done.
  122. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_top.so
  123. Symbol file not found for /opt/ah/lib/libgdbm.so.3
  124. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_db.so...done.
  125. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_db.so
  126. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dcd.so...done.
  127. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_dcd.so
  128. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_cli.so...done.
  129. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_cli.so
  130. Symbol file not found for /lib/libc.so.6
  131. Symbol file not found for /lib64/ld-linux-x86-64.so.2
  132. (gdb) info sharedlib  -----发现部分原来没有的共享库有了,但是原来有的却没有了,原因是solib-absolute-prefix被修改了
  133. warning: Can't read pathname for load map: Input/output error.
  134. From To Syms Read Shared Object Library
  135. 0x00007ffa036f2e70 0x00007ffa036fe674 Yes ./images/rootfs_tmp/opt/ah/lib/libah_event.so
  136. 0x00007ffa034e7180 0x00007ffa034ee7fc Yes ./images/rootfs_tmp/opt/ah/lib/libah_mpi.so
  137. 0x00007ffa032dfa20 0x00007ffa032e39e8 Yes ./images/rootfs_tmp/opt/ah/lib/libah_sys.so
  138. 0x00007ffa030cc020 0x00007ffa030d8228 Yes ./images/rootfs_tmp/opt/ah/lib/libah.so
  139.                                         No /lib/libpthread.so.0
  140. 0x00007ffa02c90fe0 0x00007ffa02ca4fd0 Yes ./images/rootfs_tmp/opt/ah/lib/libah_tpa.so
  141. 0x00007ffa02a80d90 0x00007ffa02a867f4 Yes ./images/rootfs_tmp/opt/ah/lib/libah_dhcp.so
  142. 0x00007ffa0287b040 0x00007ffa0287bff0 Yes ./images/rootfs_tmp/opt/ah/lib/libah_dhcp_db.so
  143. 0x00007ffa02677058 0x00007ffa026785c4 Yes ./images/rootfs_tmp/opt/ah/lib/libah_top.so
  144.                                         No /opt/ah/lib/libgdbm.so.3
  145. 0x00007ffa0226bd28 0x00007ffa0226c788 Yes ./images/rootfs_tmp/opt/ah/lib/libah_db.so
  146. 0x00007ffa0201b2f8 0x00007ffa02058b9c Yes ./images/rootfs_tmp/opt/ah/lib/libah_dcd.so
  147. 0x00007ffa01e048a0 0x00007ffa01e0ab68 Yes ./images/rootfs_tmp/opt/ah/lib/libah_cli.so
  148.                                         No /lib/libc.so.6
  149.                                         No /lib64/ld-linux-x86-64.so.2
  150. (gdb) set solib-search-path /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/  ---将缺少的lib加入search-path中。
  151. warning: Can't read pathname for load map: Input/output error.
  152. Error while mapping shared library sections:
  153. /opt/ah/lib/libgdbm.so.3: No such file or directory.
  154. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_event.so...done.
  155. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_event.so
  156. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_mpi.so...done.
  157. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_mpi.so
  158. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_sys.so...done.
  159. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_sys.so
  160. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah.so...done.
  161. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah.so
  162. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0...done.
  163. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  164. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_tpa.so...done.
  165. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_tpa.so
  166. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dhcp.so...done.
  167. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_dhcp.so
  168. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dhcp_db.so...done.
  169. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_dhcp_db.so
  170. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_top.so...done.
  171. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_top.so
  172. Symbol file not found for /opt/ah/lib/libgdbm.so.3
  173. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_db.so...done.
  174. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_db.so
  175. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_dcd.so...done.
  176. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_dcd.so
  177. Reading symbols from /home/gwwu/codes/cfd_896/build_AH-APPLIANCE-1/images/rootfs_tmp/opt/ah/lib/libah_cli.so...done.
  178. Loaded symbols for ./images/rootfs_tmp/opt/ah/lib/libah_cli.so
  179. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6...done.
  180. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  181. Reading symbols from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/ld-linux-x86-64.so.2...done.
  182. Loaded symbols for /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/ld-linux-x86-64.so.2
  183. (gdb) info sharedlib
  184. warning: Can't read pathname for load map: Input/output error.
  185. From To Syms Read Shared Object Library
  186. 0x00007ffa036f2e70 0x00007ffa036fe674 Yes ./images/rootfs_tmp/opt/ah/lib/libah_event.so
  187. 0x00007ffa034e7180 0x00007ffa034ee7fc Yes ./images/rootfs_tmp/opt/ah/lib/libah_mpi.so
  188. 0x00007ffa032dfa20 0x00007ffa032e39e8 Yes ./images/rootfs_tmp/opt/ah/lib/libah_sys.so
  189. 0x00007ffa030cc020 0x00007ffa030d8228 Yes ./images/rootfs_tmp/opt/ah/lib/libah.so
  190. 0x00007ffa02eb2270 0x00007ffa02ebcb08 Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libpthread.so.0
  191. 0x00007ffa02c90fe0 0x00007ffa02ca4fd0 Yes ./images/rootfs_tmp/opt/ah/lib/libah_tpa.so
  192. 0x00007ffa02a80d90 0x00007ffa02a867f4 Yes ./images/rootfs_tmp/opt/ah/lib/libah_dhcp.so
  193. 0x00007ffa0287b040 0x00007ffa0287bff0 Yes ./images/rootfs_tmp/opt/ah/lib/libah_dhcp_db.so
  194. 0x00007ffa02677058 0x00007ffa026785c4 Yes ./images/rootfs_tmp/opt/ah/lib/libah_top.so
  195.                                         No /opt/ah/lib/libgdbm.so.3
  196. 0x00007ffa0226bd28 0x00007ffa0226c788 Yes ./images/rootfs_tmp/opt/ah/lib/libah_db.so
  197. 0x00007ffa0201b2f8 0x00007ffa02058b9c Yes ./images/rootfs_tmp/opt/ah/lib/libah_dcd.so
  198. 0x00007ffa01e048a0 0x00007ffa01e0ab68 Yes ./images/rootfs_tmp/opt/ah/lib/libah_cli.so
  199. 0x00007ffa01ad61b0 0x00007ffa01bb4c6c Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  200. 0x00007ffa03904ac0 0x00007ffa0391a8a4 Yes /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/ld-linux-x86-64.so.2
  201. (gdb) bt
  202. #0 0x00007ffa01b7a062 in select () from /eng/crosstool/x86_64-aerohive-linux-gnu/x86_64-aerohive-linux-gnu/sysroot/lib/libc.so.6
  203. #1 0x00007ffa030d6226 in ah_arpping (yiaddr=0, ip=1412177643, smac=0x100000000010 <Address 0x100000000010 out of bounds>,
  204.     dmac=0x5088c0a04088c0a <Address 0x5088c0a04088c0a out of bounds>, interface=0x60c230



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