[英]How to debug libtool executable in Qt Creator?
我有一個Autotools + libtool項目,並且正在嘗試為其設置Qt Creator。
我通過Import project --> Import Existing Project
創建了項目。 構建( make
)並運行指定的可執行文件可以正常工作,但是當我嘗試調試時出現錯誤
not in executable format: File format not recognized
您需要使用libtool --mode=execute gdb your_program
進行調試,請參見http://www.gnu.org/software/libtool/manual/html_node/Debugging-executables.html
對於Qt Creator,您可以創建一個腳本
#!/bin/bash
exec libtool --mode=execute /usr/bin/gdb "$@"
在Options --> Build & Run --> Debuggers
指定它(然后在“ Kits
頁面上選擇調試器)
還要在項目運行設置中選中Run In Terminal
中運行”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.