.gdbinit###
handle pass
handle nostop
set confirm off
set pagination off
set print pretty
set target-async 0
set scheduler-locking on
set non-stop off
.gdbinit###
define gobt
set logging file ~/gdblog ## 改变记录文件,默认记录文件是gdb.txt。
默认这个项目是关闭,
也就是以添加的形式将记录信息写入文件,这样之前文件中的信息不会被覆盖掉。
注意:如果设置这个选项的时候记录功能已经打开,需要关闭记录功能再重新打开才能起作用。
set logging overwrite off
set logging redirect on ## 设置输出信息只记录到文件不作显示。
set logging on
bt
set logging off
shell echo #Local Variables: # >> ~/gdblog
shell echo #mode: compilation # >> ~/gdblog
shell echo #End: # >> ~/gdblog
shell emacs -n ~/gdblog
end
define showmem
set
arg0
set
arg1
printf "%p:%d\n",
LEN
set $COUNT=0
while ($COUNT < $LEN)
printf "0x%02x ", *(unsigned char*)($DATA+$COUNT)
set $COUNT=$COUNT+1
if (0 == ($COUNT % 16))
printf "\n"
end
end
printf "\n"
end
p/x data@len
p/x data[0]@len
p/x *data@len
variable, 变量
set
VAR=$VAR+