summaryrefslogtreecommitdiffstats
path: root/gcore
blob: 590fb19bdf5c4cb6c10848c61b660fe2e4dae45f (plain)
1
2
3
4
5
6
7
8
#!/bin/sh

if [[ -z $1 ]]; then
 echo "usage: gcore <pid>"
 exit 1
fi

exec gdb -batch -ex "attach $1" -ex "generate-core-file" -ex "detach"