aboutsummaryrefslogtreecommitdiff
path: root/tools/Linux/xbmc.sh.in
diff options
context:
space:
mode:
authorMarius T <mus.svz@gmail.com>2013-08-09 15:15:04 +0200
committerMarius T <mus.svz@gmail.com>2013-08-09 15:27:10 +0200
commit4bf818498ed50c3716fbbef3648112ab92f5d529 (patch)
tree2ee32c7168375f827f2e15def023ac6957ed821c /tools/Linux/xbmc.sh.in
parenta61679c6c92cedad83a8df470eef4357c54a93d2 (diff)
xbmc.sh: extract core dump from systemd's journal
On systemd systems, core dumps are - by default - written to systemd's logging system, the journal. The print_crash_report function only searches certain directories for the core dump, but would never find it in the journal, resulting in an empty stack trace in the crash log. As a workaround, simply extract the last core dump caused by xbmc.bin to "core" where the single_stacktrace function will find it. If the system is configured to not dump cores into the journal, systemd-coredumpctl will simply fail silently. see also http://www.freedesktop.org/software/systemd/man/systemd-coredumpctl.html
Diffstat (limited to 'tools/Linux/xbmc.sh.in')
-rw-r--r--tools/Linux/xbmc.sh.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/Linux/xbmc.sh.in b/tools/Linux/xbmc.sh.in
index 8999b44aee..2bead97fe4 100644
--- a/tools/Linux/xbmc.sh.in
+++ b/tools/Linux/xbmc.sh.in
@@ -77,6 +77,9 @@ print_crash_report()
echo >> $FILE
echo "############### STACK TRACE #################" >> $FILE
if which gdb >/dev/null 2>&1; then
+ if which systemd-coredumpctl &> /dev/null; then
+ systemd-coredumpctl dump -o core xbmc.bin &> /dev/null
+ fi
single_stacktrace "$PWD" 1
# Find in plugins directories
if [ $XBMC_HOME ]; then