me-no-dev / EspExceptionDecoder

Exception Stack Trace Decoder for ESP8266 and ESP32
GNU General Public License v2.0
1.04k stars 137 forks source link

Add optional, automatic OOM logger parsing for ESP8266 w/low-overhead OOM #30

Closed earlephilhower closed 6 years ago

earlephilhower commented 6 years ago

Howdy @me-no-dev . This is paired with https://github.com/esp8266/Arduino/pull/4220 to implement an almost 0-overhead OOM memory checker in standard (non-OOM build) tests for the ESP8266.

No rush on looking at this unless igrr et. al. are interested in pulling in those changes above.

---snip--- An updated ESP8266 panic function can print out the calling function/line and size requested for the last malloc/realloc/calloc/new allocation that failed, without the overhead of full the OOM stack.

Add parsing for this line, when present, and output the function, file, line, and amount of memory requested to the display. When not present, do nothing different.

earlephilhower commented 6 years ago

Closing in lieu of the more-complete update proposed in #31 which will help both ESP32 and ESP8266 by working around toolchain problems.