摘要:
pstack.sh 改进版本#!/bin/bashif (( $# < 1 )) ; then echo "usage: `basename $0` pid" 1>&2 exit 1fi if [[ ! -r /proc/$1 ]] ; then echo "Process $1 not found." 1>&2 exit 1fi (gdb -quiet -nx /proc/$1/exe -p $1 <<EOFdefine my_dump_all_stackx \$pcbtendthread apply al 阅读全文