@@ -43,23 +43,26 @@ enum rst_reason_sw
43
43
REASON_USER_SWEXCEPTION_RST = 254
44
44
};
45
45
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.
46
49
static struct PostmortemInfo {
47
- int user_reset_reason; // REASON_DEFAULT_RST;
50
+ int user_reset_reason = REASON_DEFAULT_RST;
48
51
49
52
// 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 ;
54
57
55
58
// 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 ;
58
61
59
62
// Common way to notify about where the stack smashing happened
60
63
// (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;
63
66
64
67
// From UMM, the last caller of a malloc/realloc/calloc which failed:
65
68
extern struct umm_last_fail_alloc {
0 commit comments