天天看點

eclipse 平台gdbserver調試arm-linux程式

上回書到gdbserver編譯安裝完成,接下來該gdb本地調試了,由于gdb指令界面的調試一個大的工程還是很不爽的,那就借助eclipse強大的功能來協助調試吧,整整搞了兩天才把這個環境搭建起來,linux下很多東西和windos下不一樣,windos下的調試環境一般很友好,不用費什麼周折,但linux下有些東西别人的一句話就夠你折騰好幾天了,趁年輕再折騰折騰,網上的大都比較老,我的是eclipse3.7 gdb7.6 有的地阿芳還是不一樣的,呵呵。

想起一句很重要的話,在linux下一般遇到問題搞了好久沒搞定,那就更新新版本吧,名言呀,切記。

一,建好eclipse工程

不多說了,網上資料一籮筐,不會的自己補課。

eclipse 平台gdbserver調試arm-linux程式
eclipse 平台gdbserver調試arm-linux程式

二 設定debug選項

run->debug configurations

eclipse 平台gdbserver調試arm-linux程式

在c remote application 菜單下輕按兩下,建立mydebug

c application選項為要調試的應用程式

eclipse 平台gdbserver調試arm-linux程式
eclipse 平台gdbserver調試arm-linux程式

gdb debugger選擇編譯的arm-linux-gdb

在下面using gdb manual remote 單擊 select other  

eclipse 平台gdbserver調試arm-linux程式
eclipse 平台gdbserver調試arm-linux程式

選擇 manual remote

eclipse 平台gdbserver調試arm-linux程式
eclipse 平台gdbserver調試arm-linux程式

選擇tcp 填入開發闆ip和端口

三 開始調試

開發闆端

[email protected]:/# gdbserver 192.168.0.105:5555 ./test

eclipse 平台gdbserver調試arm-linux程式
eclipse 平台gdbserver調試arm-linux程式

OK了,享受圖形界面調試的樂趣吧,一天又快完了,還好摸索出來了。

繼續閱讀