Skip to content

Commit 3dd08be

Browse files
committed
requested changes
1 parent ea9befa commit 3dd08be

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

cores/esp8266/core_esp8266_postmortem.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,26 @@ enum rst_reason_sw
4343
REASON_USER_SWEXCEPTION_RST = 254
4444
};
4545

46+
// Confirmed on 12/17/22: s_pm is in the .bss section and is in the
47+
// _bss_start/end range to be zeroed by the SDK this happens after the SDK first
48+
// calls to Cache_Read_Enable_New.
4649
static struct PostmortemInfo {
47-
int user_reset_reason; // REASON_DEFAULT_RST;
50+
int user_reset_reason = REASON_DEFAULT_RST;
4851

4952
// These will be pointers to PROGMEM const strings
50-
const char* panic_file; // 0;
51-
int panic_line; // 0;
52-
const char* panic_func; // 0;
53-
const char* panic_what; // 0;
53+
const char* panic_file = 0;
54+
int panic_line = 0;
55+
const char* panic_func = 0;
56+
const char* panic_what = 0;
5457

5558
// Our wiring for abort() and C++ exceptions
56-
bool abort_called; // false;
57-
const char* unhandled_exception; // NULL;
59+
bool abort_called = false;
60+
const char* unhandled_exception = NULL;
5861

5962
// Common way to notify about where the stack smashing happened
6063
// (but, **only** if caller uses our handler function)
61-
uint32_t stacksmash_addr; // 0;
62-
} s_pm = {REASON_DEFAULT_RST, 0, 0, 0, 0, false, NULL, 0};
64+
uint32_t stacksmash_addr = 0;
65+
} s_pm;
6366

6467
// From UMM, the last caller of a malloc/realloc/calloc which failed:
6568
extern struct umm_last_fail_alloc {

0 commit comments

Comments
 (0)