lldbの使い方
課題で使ったlog.
start lldb
% lldb 実行ファイル名
stop lldb
(lldb) quit (lldb) q
show help
(lldb) help (lldb) help コマンド
run program
(lldb) run
(lldb) r
set break point
(lldb) br set --file test.c --line 6 (lldb) br set -f test.c -l 6 (lldb) b test.c:8
set break point with function
(lldb) br set -n func (lldb) br set --name func (lldb) breakpoint set -F fun
show break point list
(lldb) breakpoint list (lldb) br li
disable break point
(lldb) breakpoint disable <ブレークポイントの番号>
enable break point
(lldb) breakpoint enable <ブレークポイントの番号>
delete break point
(lldb) breakpoint delete <ブレークポイントの番号>
print variable
(lldb) print var
(lldb) po var
print structure
(lldb) p struct
(lldb) p struct[0]
exec step
(lldb) s
go to next step
(lldb) n
exec continue
(lldb) c
show watch vars
(lldb) watch list
add watch var
watch set var 変数名
参考にさせていただいたwebページ
LLDBを使ってCのデバッグをする - Qiita
OSX - LLDB 使い方まとめ - Qiita
入門LLDB - sleeping cat syndrome