Skip to content

Commit 321d256

Browse files
Merge pull request #7085 from mhightower83/pr-bear-stack-dump
Corrected stack start and end in stack_thunk_dump_stack().
2 parents 5efdc77 + c07a1fd commit 321d256

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cores/esp8266/StackThunk.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ uint32_t stack_thunk_get_max_usage()
111111
/* Print the stack from the first used 16-byte chunk to the top, decodable by the exception decoder */
112112
void stack_thunk_dump_stack()
113113
{
114-
uint32_t *pos = stack_thunk_top;
115-
while (pos < stack_thunk_ptr) {
114+
uint32_t *pos = stack_thunk_ptr;
115+
while (pos < stack_thunk_top) {
116116
if ((pos[0] != _stackPaint) || (pos[1] != _stackPaint) || (pos[2] != _stackPaint) || (pos[3] != _stackPaint))
117117
break;
118118
pos += 4;
119119
}
120120
ets_printf(">>>stack>>>\n");
121-
while (pos < stack_thunk_ptr) {
121+
while (pos < stack_thunk_top) {
122122
ets_printf("%08x: %08x %08x %08x %08x\n", (int32_t)pos, pos[0], pos[1], pos[2], pos[3]);
123123
pos += 4;
124124
}

0 commit comments

Comments
 (0)