From c07a1fd1b740355f096046b49cc51d3d921711ea Mon Sep 17 00:00:00 2001 From: M Hightower <27247790+mhightower83@users.noreply.github.com> Date: Fri, 14 Feb 2020 11:05:04 -0800 Subject: [PATCH] Corrected stack start and end in stack_thunk_dump_stack(). --- cores/esp8266/StackThunk.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cores/esp8266/StackThunk.cpp b/cores/esp8266/StackThunk.cpp index 89294d390..541cd440f 100644 --- a/cores/esp8266/StackThunk.cpp +++ b/cores/esp8266/StackThunk.cpp @@ -111,14 +111,14 @@ uint32_t stack_thunk_get_max_usage() /* Print the stack from the first used 16-byte chunk to the top, decodable by the exception decoder */ void stack_thunk_dump_stack() { - uint32_t *pos = stack_thunk_top; - while (pos < stack_thunk_ptr) { + uint32_t *pos = stack_thunk_ptr; + while (pos < stack_thunk_top) { if ((pos[0] != _stackPaint) || (pos[1] != _stackPaint) || (pos[2] != _stackPaint) || (pos[3] != _stackPaint)) break; pos += 4; } ets_printf(">>>stack>>>\n"); - while (pos < stack_thunk_ptr) { + while (pos < stack_thunk_top) { ets_printf("%08x: %08x %08x %08x %08x\n", (int32_t)pos, pos[0], pos[1], pos[2], pos[3]); pos += 4; }