-
Notifications
You must be signed in to change notification settings - Fork 141
Add panic address decoder and monitor input #195
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
base: main
Are you sure you want to change the base?
Conversation
This should now be able to decode rom and app elf files with a working live example. @brianignacio5 |
Question, should the panic decoder perhaps be its own package, not part of esptool-js? It seems that flashing is a common thing for ESP32 series chips, while decoding the panic handler output is tightly coupled with ESP-IDF. For comparison, in Python ecosystem we have separate esptool package for flashing and esp-idf-panic-decoder for the handling of ESP-IDF crash dumps. |
I already put the elf file decoder in a seperate package and the panic decoder is not a lot of code for it to feasible. And it was recommended by @brianignacio5 to move it from the vscodr-esp-idf-web extension to esptool-js |
@igrr Do you insist on it being its own package? I just don't like that deep level of unnecessary abstraction, as it results in a difficult to undestand code (It took myself some time of put together to pieces of the python implementation, because I needed to search and reference code from many different repos) and when an improvement is made it takes 3-4 merges |
I don't insist on anything... I just find it odd that a flashing tool (which could, for instance, be used to Flash a Zephyr or a Rust application, which would have a totally different panic output format) would "know" something specific to esp-idf. You can leave the code in esptool-js if you find that more convenient. |
I isn't esp-idf specific. It should work with any elf file. |
The console output gets checked for hex numbers (0x...) and then get decoded. The decoding proccess relies on th compiler having put the debug info into to elf file. Which then just gets parsed to get the function (if available line) to address relation. All that is defined in the elf spec. |
Ah, I see, apologies for not properly reading what your PR does. I agree that part is not ESP-IDF-specific. |
I don't know what the esp-idf-panic-decoder does more than just decode every address it sees to a line. I saw no output difference between it and mine. |
Sorry for taking so long. I now renamed it to match the class. |
@igrr Do you mind taking a look at the PR now? |
@igrr Will conside to merge it? |
Description
Related
espressif/vscode-esp-idf-web-extension#26
Testing
OS: Windows
Browser: Chrome
Checklist
Before submitting a Pull Request, please ensure the following: