2009年2月16日星期一

ptrace in gdb

this is a nice bash function which will make ptrace for those debian users :)
red syntax works only in bash, make a default 5 second watch refresh

ptrace is a function
ptrace ()
{
    watch --interval=${2:-5} "gdb -ex 'set pagination 0' -ex 'thread apply all bt' --batch -p $(pidof -sx $1) | grep -v 'no debugging'"
}


没有评论: