gdb define command

省事的命令:

 

show user :

(gdb) show user adder
User command "adder":
  print $arg0+$arg1+$arg2

(gdb) define adder
Type commands for definition of "adder".
End with a line saying just "end".
>print $arg0+$arg1+$arg2
>end
(gdb) adder 1 2 3

6

 

初始化脚本 .gdbinit

gdb 初始过程

1 executes all command from system init file (like /etc/bashrc)

2 executes home init file (like ~/.bashrc)

3 process command line options

4 executes all the commands from (./.exrc)

5 -x specified init file

6 load history command

 

set history filename xxx

set history save on/off

show history

show commands

 

 

------------------------

i handle = info handle = info signals

 

------

chechpoint

info checkpoint

restart checkpoint-id

kkkk

las-mile

 

 

posted on 2014-03-17 22:41  kwingmei  阅读(471)  评论(0编辑  收藏  举报

导航