「回溯已停止:與此幀相同的前一幀(損壞的堆棧?我複製了核心轉儲文件,並嘗試在x86_64主機上使用arm-gdb獲取回溯。這是O/P:「在Linux上運行應用程序(ARM體系結構)時,我試圖調試一個段錯誤(segfault)」,在linux linux
$ arm-arago-linux-gnueabi-gdb test_slave6_slave core
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-oesdk-linux --target=arm-oe-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/dvdk/test_slave6_slave...done.
warning: exec file is newer than core file.
[New LWP 6411]
[New LWP 6410]
warning: Could not load shared library symbols for 12 libraries, e.g. /lib/libjson-c.so.2.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `/usr/bin/test_slave6_slave 5 111.111.111.111 1 2 1 2'.
Program terminated with signal 11, Segmentation fault.
#0 0x47b61dd4 in ??()
(gdb) bt
#0 0x47b61dd4 in ??()
#1 0x47b2e0fc in ??()
#2 0x47b2e0fc in ??()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
(時間戳警告,可能是因爲我第一次複製的核心文件)
我不認爲this問題,因爲我得到有效的地址,我的問題是相同的。我認爲這仍然是一個堆棧腐敗問題。但我不知道如何進一步調試。我應該使用GDB還是valgrind?有人能指出我使用這些工具進行調試的正確步驟嗎?例如,我應該使用帶leak_check的valgrind使用memecheck嗎?
更新1:我正在使用libcurl進行https請求。我注意到當另一個沒有ssl支持的libcurl版本被使用時,崩潰不會發生。 (查詢將失敗)。啓用了ssl的libcurl是我自定義編譯的。
Gdb給你一個建議,看一下'info sharedlibrary',這個命令的輸出是什麼?但是,我更關心'exec文件比核心文件更新'這樣的警告,你是否正在構建正確的共享庫? –