summaryrefslogtreecommitdiffstats
path: root/firmware/panic.c
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2014-01-05 22:20:26 +0100
committerFrank Gevaerts <frank@gevaerts.be>2014-01-11 11:37:18 +0100
commit25e50ed8f1361ef3295aeb298a3edf2214f5b3b3 (patch)
treea4b5516cb23e2915666eb0f36ef7462e6b5228c3 /firmware/panic.c
parentfe73d75e7485019a6206c4aa7e414a93bc70c05f (diff)
downloadrockbox-25e50ed8f1361ef3295aeb298a3edf2214f5b3b3.tar.gz
rockbox-25e50ed8f1361ef3295aeb298a3edf2214f5b3b3.tar.bz2
rockbox-25e50ed8f1361ef3295aeb298a3edf2214f5b3b3.zip
Print `last logf lines on panic().
If logf is enabled, panic() will print the last lines. On small screens this is more or less useless, but on large screens it can be very useful for debugging. Change-Id: I26dfc76e9ac4a2ddc2def8db1616a04f943dbba3 Reviewed-on: http://gerrit.rockbox.org/709 Reviewed-by: Thomas Martitz <kugel@rockbox.org> Reviewed-by: Frank Gevaerts <frank@gevaerts.be> Tested: Frank Gevaerts <frank@gevaerts.be>
Diffstat (limited to 'firmware/panic.c')
-rw-r--r--firmware/panic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/panic.c b/firmware/panic.c
index 0d49847a19..3f01689922 100644
--- a/firmware/panic.c
+++ b/firmware/panic.c
@@ -30,6 +30,7 @@
#include "led.h"
#include "power.h"
#include "system.h"
+#include "logf.h"
#if defined(CPU_ARM)
#include "gcc_extensions.h"
@@ -115,6 +116,9 @@ void panicf( const char *fmt, ...)
#if defined(CPU_ARM)
backtrace(pc, sp, &y);
#endif
+#ifdef ROCKBOX_HAS_LOGF
+ logf_panic_dump(&y);
+#endif
#else
/* no LCD */
#endif