- run with arguments
gdb --ex=run --args program argu1 arg2 ...
- gdb script
run
where
frame 1
(switch to #1)what variable
(show type of variable)print variable
(print value of variable)- Reference:
2018年1月9日 星期二
[Debug] gdb
2017年8月27日 星期日
[Mac] Code sign for gdb
- 在 Mac上以 MacPort 安裝 gdb 後, 會顯示
gdb has the following notes: You will need to codesign /opt/local/bin/ggdb See https://sourceware.org/gdb/wiki/BuildingOnDarwin#Giving_gdb_permission_to_control_other_processes for more information.- 請按照網頁所列方法為 gdb 做 code sign. 否則在 gdb run的時候會顯示以下 error message:
Unable to find Mach task port for process-id 72241: (os/kern) failure (0x5). (please check gdb is codesigned - see taskgated(8))
訂閱:
文章 (Atom)