簡體   English   中英

如何從gdb的backtrace中提到的地址進行調試

[英]How to debug from addresses mentioned in backtrace of gdb

Program terminated with signal 11, Segmentation fault.
#0  0x00007f0412571733 in boost::detail::interruption_checker::~interruption_checker() ()
from /opt/HYDRAstor/objectStorage/lib/release_prod_64/libXyzService.so
Missing separate debuginfos, use: debuginfo-install python-2.6.6-52.x86_64
(gdb) where
#0  0x00007f0412571733 in boost::detail::interruption_checker::~interruption_checker() ()

from /opt/HYDRAstor/objectStorage/lib/release_prod_64/libXyzService.so
#1  0x00007f041181547a in boost::this_thread::sleep(boost::posix_time::ptime const&) () from /usr/lib64/libboost_thread-mt.so.1.41.0

#2  0x00007f040c5ea36c in void boost::this_thread::sleep<boost::posix_time::seconds>(boost::posix_time::seconds const&) ()
from /opt/HYDRAstor/objectStorage/lib/release_prod_64/libAbcLib.so

#3  0x00007f040c5daf63 in healthMonitoring::healthMonitoringController::print(bool) ()
from /opt/HYDRAstor/objectStorage/lib/release_prod_64/libAbcLib.so

#4  0x00007f0411813d10 in thread_proxy () from /usr/lib64/libboost_thread-mt.so.1.41.0

#5  0x000000365d6079d1 in start_thread () from /lib64/libpthread.so.0

#6  0x000000365cee88fd in clone () from /lib64/libc.so.6

(gdb)

從該回溯中可以看到,加載的共享庫libXyz.so會引發seg錯誤。 那么,如何從共享庫的代碼的哪一點知道該段錯誤出現了呢?

每幀開頭提到的地址的用途是什么。 請讓我知道是否需要更多詳細信息。

那么,如何從共享庫的代碼的哪一點知道該段錯誤出現了呢?

嘗試在禁用優化(啟用-O0-Og )和啟用調試信息( -g )的情況下從頭開始重建所有內容。 並確保您沒有剝離生成的二進制文件(不在它們上運行strip )。

這應該為您提供具有行號和文件名的更有意義的堆棧跟蹤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM