gdb define command

时间:2014-03-18 12:03:24   收藏:0   阅读:492

省事的命令:

 

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

gdb define command,布布扣,bubuko.com

原文:http://www.cnblogs.com/kwingmei/p/3606370.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!