aboutsummaryrefslogtreecommitdiff
path: root/contrib/scripts/debug
diff options
context:
space:
mode:
authorNils Gillmann <ng0@n0.is>2018-05-19 14:43:13 +0000
committerNils Gillmann <ng0@n0.is>2018-05-19 14:43:13 +0000
commit6ab60d4920bb3199aee8cd872b930e9e3e808ba7 (patch)
tree3d761dbf8793a1d2422fbd14667255c7e0292ea4 /contrib/scripts/debug
parentc2f27dfe8218545c327ab49d225a49910347c5c6 (diff)
downloadgnunet-6ab60d4920bb3199aee8cd872b930e9e3e808ba7.tar.gz
gnunet-6ab60d4920bb3199aee8cd872b930e9e3e808ba7.zip
Restructure contrib folder.
contrib/pogen.sh -> bin/pogen.sh bootstrap: Use new pogen location and execute it. contrib/openvpn-tap32: Move to contrib/3rdparty/Windows/openvpn-tap32. contrib/gnunet-logo*: Move to contrib/branding/logo/ Delete old patches in contrib, predating git. Move buildbot data to contrib/ci/buildbot, move docker data to contrib/ci/docker. Create contrib/conf and populate it with config files found in contrib and bin. Move gns related data to contrib/gns. delete contrib/repeat.sh Move contrib/log.php into contrib/web/log.php. Create folder contrib/scripts and use it for most scripts in contrib. Remove trailing whitespace in doc/Makefile.am Signed-off-by: Nils Gillmann <ng0@n0.is>
Diffstat (limited to 'contrib/scripts/debug')
-rwxr-xr-xcontrib/scripts/debug37
1 files changed, 37 insertions, 0 deletions
diff --git a/contrib/scripts/debug b/contrib/scripts/debug
new file mode 100755
index 000000000..3de2c9a14
--- /dev/null
+++ b/contrib/scripts/debug
@@ -0,0 +1,37 @@
1#!/bin/bash
2# /proc/sys/kernel/core_pattern should be core.%p.%E
3
4COREPID=$1
5
6COREFILES=`ls -1 *core.$COREPID* 2>/dev/null | wc -l`
7COREFILE=`ls -1 *core.$COREPID* 2>/dev/null | head -n 1`
8
9if [ $COREFILES -gt 1 ]; then
10 echo "Multiple files, using $COREFILE"
11fi
12
13
14if [ $COREFILES -eq 0 ]; then
15 SERVICENAME=$1
16 COREFILES=`ls -1 core.*.*$SERVICENAME 2>/dev/null | wc -l`
17 COREFILE=`ls -1 core.*.*$SERVICENAME 2>/dev/null | head -n 1`
18
19 if [ $COREFILES -gt 1 ]; then
20 echo "Multiple files, using $COREFILE"
21 fi
22fi
23
24if [ $COREFILES -eq 0 ]; then
25 echo "Core file for $1 not found"
26 exit 1
27fi
28
29echo "Using $COREFILE"
30
31EXECPATH=${COREFILE#*!}
32EXECPATH=`echo $EXECPATH | sed -e 's/!/\//g'`
33echo $EXECPATH
34echo ""
35echo ""
36
37gdb --core $COREFILE /$EXECPATH