Add heap information to fatal exception & abort dumps

This commit is contained in:
Angus Gratton 2016-05-15 10:36:33 +10:00
parent efedd24624
commit 981c87899b
4 changed files with 47 additions and 4 deletions

View file

@ -10,9 +10,12 @@
#define _DEBUG_DUMPS_H
#include <stdint.h>
/* Dump stack memory starting from stack pointer address sp. */
/* Dump stack memory to stdout, starting from stack pointer address sp. */
void dump_stack(uint32_t *sp);
/* Dump heap statistics to stdout */
void dump_heapinfo(void);
/* Called from exception_vectors.S when a fatal exception occurs.
Probably not useful to be called in other contexts.

View file

@ -19,7 +19,7 @@
* Note that the compiler will push a stack frame (minimum 16 bytes)
* in the prelude of a C function that calls any other functions.
*/
#define SP(var) asm volatile ("mov %0, a1" : "=r" (var));
#define SP(var) asm volatile ("mov %0, a1" : "=r" (var))
/* Read the function return address to a variable.
*