Allows objects to be inserted at any offset in the debug buffer for analysis.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/include/reef/debug.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/src/include/reef/debug.h b/src/include/reef/debug.h index 2bee8e6..ef64419 100644 --- a/src/include/reef/debug.h +++ b/src/include/reef/debug.h @@ -98,6 +98,16 @@ *(__m++) = *(__a++); \ } while (0);
+/* dump data area at addr and size count at mailbox ofset or shared memory */ +#define dump_at(addr, count, offset) \ + do { \ + volatile uint32_t *__m = (uint32_t*)mailbox_get_debug_base() + offset; \ + volatile uint32_t *__a = (uint32_t*)addr; \ + volatile int __c = count; \ + while (__c--) \ + *(__m++) = *(__a++); \ + } while (0); + /* dump object to start of mailbox */ #define dump_object(__o) \ dbg(); \ @@ -108,6 +118,10 @@ dbg(); \ dump(__o, sizeof(*(__o)) >> 2);
+#define dump_object_ptr_at(__o, __at) \ + dbg(); \ + dump_at(__o, sizeof(*(__o)) >> 2, __at); + #else
#define dbg()