summaryrefslogtreecommitdiffstats
path: root/subsurface.debug
diff options
context:
space:
mode:
authorGravatar Guillaume GARDET <guillaume.gardet@free.fr>2017-10-20 16:12:38 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-20 14:25:09 -0400
commit0671739e02b86eb689f206b475ba57a62703ee2e (patch)
treec69cc9c3a7c38898773c8f2f1dad19d72f550b19 /subsurface.debug
parentcd555f9dace9a1046819d6711e2e6dd0d87b6a70 (diff)
downloadsubsurface-0671739e02b86eb689f206b475ba57a62703ee2e.tar.gz
Make use of 'coredumpctl dump' in Subsurface.debug helper
Diffstat (limited to 'subsurface.debug')
-rwxr-xr-xsubsurface.debug17
1 files changed, 9 insertions, 8 deletions
diff --git a/subsurface.debug b/subsurface.debug
index 1ad838f7d..a282a38e4 100755
--- a/subsurface.debug
+++ b/subsurface.debug
@@ -55,14 +55,15 @@ print_crash_report()
echo >> $FILE
echo "############### STACK TRACE #################" >> $FILE
if command_exists gdb; then
-# TODO: systemd needs more test (systemd-coredumpctl exist on openSUSE 13.1 but does not find any core)
-# if command_exists systemd-coredumpctl; then
-# systemd-coredumpctl dump -o core ${prefix}/bin/${bin_name} > /dev/null 2>&1
-# elif command_exists coredumpctl; then
-# coredumpctl dump -o core ${prefix}/bin/${bin_name} > /dev/null 2>&1
-# fi
- # Find in current directory
- single_stacktrace "$PWD" 1
+ if command_exists coredumpctl; then
+ # Generate core
+ core=$(mktemp -p /tmp/ core.subsurface.XXXXXXXXXX)
+ coredumpctl dump ${prefix}/bin/${bin_name} > $core
+ single_stacktrace "/tmp/" 1
+ else
+ # Find in current directory
+ single_stacktrace "$PWD" 1
+ fi
# Find in plugins directories
if [ $KODI_HOME ]; then
BASEDIR=$KODI_HOME