[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35035 - gnunet/contrib
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35035 - gnunet/contrib |
Date: |
Wed, 28 Jan 2015 18:08:29 +0100 |
Author: bartpolot
Date: 2015-01-28 18:08:29 +0100 (Wed, 28 Jan 2015)
New Revision: 35035
Added:
gnunet/contrib/debug
Log:
- debug script to all gdb with the correct core file and executable path
Added: gnunet/contrib/debug
===================================================================
--- gnunet/contrib/debug (rev 0)
+++ gnunet/contrib/debug 2015-01-28 17:08:29 UTC (rev 35035)
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+COREPID=$1
+
+COREFILES=`ls -1 *core.$COREPID* 2>/dev/null | wc -l`
+COREFILE=`ls -1 *core.$COREPID* 2>/dev/null | head -n 1`
+
+if [ $COREFILES -gt 1 ]; then
+ echo "Multiple files, using $COREFILE"
+fi
+
+
+if [ $COREFILES -eq 0 ]; then
+ SERVICENAME=$1
+ COREFILES=`ls -1 core.*.*$SERVICENAME 2>/dev/null | wc -l`
+ COREFILE=`ls -1 core.*.*$SERVICENAME 2>/dev/null | head -n 1`
+
+ if [ $COREFILES -gt 1 ]; then
+ echo "Multiple files, using $COREFILE"
+ fi
+fi
+
+if [ $COREFILES -eq 0 ]; then
+ echo "Core file for $1 not found"
+ exit 1
+fi
+
+echo "Using $COREFILE"
+
+EXECPATH=${COREFILE#*!}
+EXECPATH=`echo $EXECPATH | sed -e 's/!/\//g'`
+echo $EXECPATH
+echo ""
+echo ""
+
+gdb --core $COREFILE /$EXECPATH
Property changes on: gnunet/contrib/debug
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35035 - gnunet/contrib,
gnunet <=