-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A few things about crash dumps #1795
Comments
EEPROM class is a pretty small wrapper around basic byte array. Format change might be interesting. Results are likely toolchain problem. You can try adding basic |
Excellent! |
Well, probably there are a bug in __wrap_system_restart_local() in core version 2.3.0 (at least); by curiosity I see the assembler for that fuction, and it seems that they don't save the correct stack pointer.
but in your link (development version?):
The problem in version 2.3.0 is that when they later references to var sp , they get the current value of register a1 (stack pointer), BUT it register is modified by __wrap_system_restart_local() it self!:
are we getting 96 bytes of non-sense stack? |
mmmmm not, there isn't... "uint32_t sp_dump = sp" don't really change nothing and we don't get 96 bytes non-sense because the offset takes them into account. |
Hi. a few thing about crash dumps: a little enhancement, one idea and a few questions
Ok, I think that
can be replaced by something like:
crashDump can be modified for conform the format of EspArduinoExpceptionDecoder? https://github.com/me21/EspArduinoExceptionDecoder. There are two field missing (ctx and offset; I don't know what are they for but Decoder requires that) and a few differences is format ("Exception(n):", "sp: xxxxxxxx end: xxxxxx offset: xxxxxxxx", these addresses without the prefix 0x). Or probably add a new command, say crashDecoder() (in terminal.ino under command crashDecoder) and crashDumpDecoder() in crash.ino for doing that.
is it possible that crashDump() is doing something wrong? I used dumps in EspArduinoExpceptionDecoder and the results were wrong; you can see it in Crashing in SonOff Pow R2 v2.0 (v 1.13.5) #1752 (comment) (for example, it resolves addresses to non-existent code lines). Ok, possible the problem is xtensa toolchain, not crashDump...
The text was updated successfully, but these errors were encountered: