Commonly-Used Commands in Gdb
时间:2010-04-24 来源:non_oop
start->next->step(step in)->finish(step out)/continue
backtrace->frame [0|1|2...]
list /*Show Source Code*/
info locals
print [variable_name]
set var [var_name = value_you_want]
whatis [var_name] /*Show the type of a given variable*/
ptype [var_name] /*more powerful than whatis, which can't show the structure definition*/ /*Break point related*/
continue
break [file_name:] [line_number] if[expression]
break [file_name:] [funcion_name] if[expression]
delete breakpoint [break_point_number] /*none for all*/
disable breakpoint [break_point_number] /*none for all*/
enable breakpoint [break_point_number] /*none for all*/
info break References: http://learn.akae.cn/media/ch10s01.html http://fanqiang.chinaunix.net/program/other/2006-07-14/4834.shtml
backtrace->frame [0|1|2...]
list /*Show Source Code*/
info locals
print [variable_name]
set var [var_name = value_you_want]
whatis [var_name] /*Show the type of a given variable*/
ptype [var_name] /*more powerful than whatis, which can't show the structure definition*/ /*Break point related*/
continue
break [file_name:] [line_number] if[expression]
break [file_name:] [funcion_name] if[expression]
delete breakpoint [break_point_number] /*none for all*/
disable breakpoint [break_point_number] /*none for all*/
enable breakpoint [break_point_number] /*none for all*/
info break References: http://learn.akae.cn/media/ch10s01.html http://fanqiang.chinaunix.net/program/other/2006-07-14/4834.shtml
相关阅读 更多 +