summaryrefslogtreecommitdiffstats
path: root/gcore
diff options
context:
space:
mode:
Diffstat (limited to 'gcore')
-rwxr-xr-xgcore8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcore b/gcore
new file mode 100755
index 0000000..590fb19
--- /dev/null
+++ b/gcore
@@ -0,0 +1,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"