开发者

Analyzing core file of shared object

T开发者_JAVA技巧ests :

[1] creating divide of 0 in executable hat was compiled with optimization (O2) and debugging symbols , thus a core was generated.

[2] creating divide of 0 in shared object hat was compiled with optimization (O2) and debugging symbols , thus a core was generated.

Results:

[First] analysing the core generated by [1] was succeeded and an exact location of the crush could be seen in GDB/Totalview.

[Second] analysing the core generated by [2] was NOT succeeded and a hex numeric location was the output of the crush.

can someone tell how can i get [2] to succeed ?


Solved it , i was opening the core file like this :

  1. gdb core core-file-name
  2. file location-of-binary

then the binary symbols was loaded, BUT Not any shared objects !!!!!

going this way :

  1. gdb -c core-file-name location-of-binary

this caused binary symbols to be loaded BUT ALSO shared objects symbols to be loaded as well !!!

thanks for the help.


Check with ldd that your shared object can be found.

If not, try with shell variable LD_LIBRARY_PATH to set its path and try again gdb <executable> core.

Another option is to edit config /etc/ld.so.conf and run ldconfig.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜