-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Stack decoder script #8661
Merged
Merged
Stack decoder script #8661
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h>
int* somewhere { nullptr };
void setup() {
delay(5000);
Serial.begin(115200);
Serial.printf("%d\n", *somewhere);
}
void loop() {
}
> decoder.py --toolchain-path ~/.platformio/packages/toolchain-xtensa/ --elf-path .pio/build/d1_mini/firmware.elf stack.txt
Exception (28) - LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads
epc1=0x4020105f: setup at /home/runner/dev/arduino8661/src/main.cpp:8
0x402018d9: esp_delay at /home/runner/.platformio/packages/framework-arduinoespressif8266@src-31d658a59f41540201fc3726a1394910/cores/esp8266/core_esp8266_main.cpp:158
0x40201055: setup at /home/runner/dev/arduino8661/src/main.cpp:8
0x40201954: loop_wrapper() at /home/runner/.platformio/packages/framework-arduinoespressif8266@src-31d658a59f41540201fc3726a1394910/cores/esp8266/core_esp8266_main.cpp:244
0x40100c39: cont_wrapper at ??:? |
either for when tools are already in PATH or, using `pio pkg exec --package toolchain-xtensa python decoder.py ...` (where package is a full version spec for pio registry)
hasenradball
pushed a commit
to hasenradball/Arduino
that referenced
this pull request
Nov 18, 2024
* stack decoder * +x * cut here * last alloc explain, line breaks * capture * print ctx line * ...and dont ignore sp * non-hyphenated arg for elf, toolchain path to bin/ either for when tools are already in PATH or, using `pio pkg exec --package toolchain-xtensa python decoder.py ...` (where package is a full version spec for pio registry)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
subj
Needs toolchain path, elf path, and the postmortem either as a file or piped into stdin
Not as colorful as java decoder, though. Like monitor filter, tries to 'update' already existing data with our knowledge of addresses and source locations.
Based on the code from
Defaults to addr2line, which seems to be working just fine.
Optional GDB
info
output(could be
list
, but I hope if there's an easier way than to parse it yet again like java version does)resolves #6310 , but probably needs some mention in the documentation