Skip to content
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

Improve the monitors auto-decoding of symbols (when using esp-idf-*) #543

Closed
t-moe opened this issue Jan 9, 2024 · 1 comment
Closed

Comments

@t-moe
Copy link

t-moe commented Jan 9, 2024

A panic by esp-idf-hal looks like this:

...

thread 'main' panicked at src/main.rs:2:5:
oh no
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

abort() was called at PC 0x42029be5 on core 0
Core  0 register dump:
MEPC    : 0x40800ecc  RA      : 0x40804152  SP      : 0x4080f330  GP      : 0x408096e0  
TP      : 0x407f0a54  T0      : 0x37363534  T1      : 0x7271706f  T2      : 0x33323130  
S0/FP   : 0x4080f36c  S1      : 0x4080f36c  A0      : 0x4080f36c  A1      : 0x4080f34e  
A2      : 0x00000000  A3      : 0x4080f399  A4      : 0x4080aebc  A5      : 0x4080aec4  
A6      : 0x00000000  A7      : 0x76757473  S2      : 0x4080f350  S3      : 0x4080f488  
S4      : 0x00000001  S5      : 0x00000000  S6      : 0x4205013c  S7      : 0x00000001  
S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
T3      : 0x6e6d6c6b  T4      : 0x6a696867  T5      : 0x66656463  T6      : 0x62613938  
MSTATUS : 0x00001881  MTVEC   : 0x40800001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000  
MHARTID : 0x00000000  

Stack memory:
4080f330: 0x00000000 0x42053c04 0x4080f36c 0x40807e80 0x00000003 0x00000000 0x00000001 0x40800030
4080f350: 0x32303234 0x35656239 0x40810100 0x40809f8c 0x4080f350 0x40809fa8 0x4080f34c 0x726f6261
4080f370: 0x20292874 0x20736177 0x6c6c6163 0x61206465 0x43502074 0x34783020 0x39323032 0x20356562
4080f390: 0x63206e6f 0x2065726f 0x00000030 0x40800000 0x42053d68 0x4080a194 0x4080f3c0 0x42029be8
4080f3b0: 0x00000001 0x4081011c 0x4080f3d0 0x42029bd8 0x40810120 0x4081011c 0x4080f410 0x4200ab2c
4080f3d0: 0x42053d68 0x4080a194 0x4080f3f0 0x4200b2d2 0x00000001 0x4081011c 0x4080f400 0x4200abe0
4080f3f0: 0x42053d68 0x4080a194 0x4080f410 0x42014af0 0x42053d68 0x4080a194 0x4080f480 0x4200aaf2
4080f410: 0x00000804 0x00000054 0x00000000 0x00000000 0x00000000 0x4080f488 0x42053d58 0x4080f4f0
4080f430: 0x4205013c 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x40810090 0x00000000
4080f450: 0x4080f4a8 0x4080f4d4 0x4080f4a0 0x00000000 0x00000000 0x00000000 0x00000000 0x4205013c
4080f470: 0x4080f4f0 0x4080f4d4 0x4080f4a0 0x4200a8b2 0x00000005 0x00000005 0x42050120 0x00000005
4080f490: 0x4080f554 0x4080f4d4 0x4080f4b0 0x42009f9e 0x4080ff60 0x00000005 0x4080f4d0 0x4200a6c0
4080f4b0: 0x4080f4f0 0x4080f4d4 0x4205013c 0x00000000 0x4080f554 0x4205014c 0x4080f4f0 0x4203b7e0
4080f4d0: 0x4080a260 0x420649c0 0x420649c0 0x4080f4f0 0x4205013c 0x40800001 0x4080f510 0x42000082
4080f4f0: 0x42050128 0x00000001 0x42050120 0x00000000 0x00000000 0x00000000 0x4080f520 0x4200002a
4080f510: 0x00000000 0x4205014c 0x4080f530 0x420000ea 0x4080f564 0x4080ff28 0x4080f550 0x4201d7bc
4080f530: 0x4080f564 0x00000000 0x420504ec 0x4204a500 0x00000000 0x00000000 0x4080f560 0x420000d0
4080f550: 0x420694e0 0x42000032 0x00000000 0x4204a5e4 0x00000000 0x00001388 0x00000001 0x00000000
4080f570: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4080f590: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4080f5b0: 0x00000154 0x4080f170 0x00000000 0x4080a410 0x4080a410 0x4080f5b4 0x4080a408 0x00000018
4080f5d0: 0x00000000 0x00000000 0x4080f5b4 0x00000000 0x00000001 0x4080d470 0x6e69616d 0x00000000
4080f5f0: 0x00000000 0x00000000 0x00000000 0x4080f5a0 0x00000001 0x00000000 0x408100b4 0x4203dbb4
4080f610: 0x00000000 0x4080bcd0 0x4080bd38 0x4080bda0 0x00000000 0x00000000 0x00000001 0x00000000
4080f630: 0x00000000 0x00000000 0x42041e48 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4080f650: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4080f670: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4080f690: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4080f6b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4080f6d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4080f6f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000600 0xa5a5a5a5
4080f710: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5



ELF file SHA256: 000000000

CPU halted.

and is decoded by espflash run --monitor to something like this:

Click to expand
thread 'main' panicked at src/main.rs:2:5:
oh no
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

abort() was called at PC 0x42029be5 on core 0
0x42029be5 - panic_abort::__rust_start_panic::abort
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_abort/src/lib.rs:43
Core  0 register dump:
MEPC    : 0x40800ecc  RA      : 0x40804152  SP      : 0x4080f330  GP      : 0x408096e0  
0x40800ecc - panic_abort
    at /home/timo/esp/esp-idf/components/esp_system/panic.c:472
0x40804152 - __ubsan_include
    at /home/timo/esp/esp-idf/components/esp_system/ubsan.c:313
0x4080f330 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x408096e0 - coex_pti_tab
    at ??:??
TP      : 0x407f0a54  T0      : 0x37363534  T1      : 0x7271706f  T2      : 0x33323130  
0x407f0a54 - ??
    at ??:??
0x37363534 - ??
    at ??:??
0x7271706f - s_rtc_timer_retain_mem
    at ??:??
0x33323130 - ??
    at ??:??
S0/FP   : 0x4080f36c  S1      : 0x4080f36c  A0      : 0x4080f36c  A1      : 0x4080f34e  
0x4080f36c - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f36c - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f36c - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f34e - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
A2      : 0x00000000  A3      : 0x4080f399  A4      : 0x4080aebc  A5      : 0x4080aec4  
0x00000000 - ??
    at ??:??
0x4080f399 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080aebc - coex_schm_env
    at ??:??
0x4080aec4 - __sf
    at ??:??
A6      : 0x00000000  A7      : 0x76757473  S2      : 0x4080f350  S3      : 0x4080f488  
0x00000000 - ??
    at ??:??
0x76757473 - s_rtc_timer_retain_mem
    at ??:??
0x4080f350 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f488 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
S4      : 0x00000001  S5      : 0x00000000  S6      : 0x4205013c  S7      : 0x00000001  
0x00000001 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x4205013c - esp_app_desc
    at ??:??
0x00000001 - ??
    at ??:??
S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
T3      : 0x6e6d6c6b  T4      : 0x6a696867  T5      : 0x66656463  T6      : 0x62613938  
0x6e6d6c6b - s_rtc_timer_retain_mem
    at ??:??
0x6a696867 - s_rtc_timer_retain_mem
    at ??:??
0x66656463 - s_rtc_timer_retain_mem
    at ??:??
0x62613938 - s_rtc_timer_retain_mem
    at ??:??
MSTATUS : 0x00001881  MTVEC   : 0x40800001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000  
0x00001881 - ??
    at ??:??
0x40800001 - _vector_table
    at ??:??
0x00000007 - ??
    at ??:??
0x00000000 - ??
    at ??:??
MHARTID : 0x00000000  
0x00000000 - ??
    at ??:??

Stack memory:
4080f330: 0x00000000 0x42053c04 0x4080f36c 0x40807e80 0x00000003 0x00000000 0x00000001 0x40800030
0x00000000 - ??
    at ??:??
0x42053c04 - anon.6f8d54fb548d5ff1abf9d01d3f110dc8.67.llvm.17408016719535564914
    at ??:??
0x4080f36c - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x40807e80 - __assert_func
    at /home/timo/esp/esp-idf/components/newlib/assert.c:34
0x00000003 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000001 - ??
    at ??:??
0x40800030 - _vector_table
    at ??:??
4080f350: 0x32303234 0x35656239 0x40810100 0x40809f8c 0x4080f350 0x40809fa8 0x4080f34c 0x726f6261
0x32303234 - ??
    at ??:??
0x35656239 - ??
    at ??:??
0x40810100 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x40809f8c - __func__.0
    at ??:??
0x4080f350 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x40809fa8 - __func__.0
    at ??:??
0x4080f34c - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x726f6261 - s_rtc_timer_retain_mem
    at ??:??
4080f370: 0x20292874 0x20736177 0x6c6c6163 0x61206465 0x43502074 0x34783020 0x39323032 0x20356562
0x20292874 - ??
    at ??:??
0x20736177 - ??
    at ??:??
0x6c6c6163 - s_rtc_timer_retain_mem
    at ??:??
0x61206465 - s_rtc_timer_retain_mem
    at ??:??
0x43502074 - esp_system_init_fn_init_components0
    at ??:??
0x34783020 - ??
    at ??:??
0x39323032 - ??
    at ??:??
0x20356562 - ??
    at ??:??
4080f390: 0x63206e6f 0x2065726f 0x00000030 0x40800000 0x42053d68 0x4080a194 0x4080f3c0 0x42029be8
0x63206e6f - s_rtc_timer_retain_mem
    at ??:??
0x2065726f - ??
    at ??:??
0x00000030 - ??
    at ??:??
0x40800000 - _vector_table
    at ??:??
0x42053d68 - anon.6f8d54fb548d5ff1abf9d01d3f110dc8.67.llvm.17408016719535564914
    at ??:??
0x4080a194 - _ZN3std9panicking4HOOK17hbc435311aff44f7fE
    at ??:??
0x4080f3c0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42029be8 - <core::option::Option<T> as object::read::ReadError<T>>::read_error
    at /home/timo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/object-0.32.1/src/read/mod.rs:101
4080f3b0: 0x00000001 0x4081011c 0x4080f3d0 0x42029bd8 0x40810120 0x4081011c 0x4080f410 0x4200ab2c
0x00000001 - ??
    at ??:??
0x4081011c - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f3d0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42029bd8 - panic_abort::__rust_start_panic::abort
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_abort/src/lib.rs:42
0x40810120 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4081011c - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f410 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200ab2c - rust_panic
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:831
4080f3d0: 0x42053d68 0x4080a194 0x4080f3f0 0x4200b2d2 0x00000001 0x4081011c 0x4080f400 0x4200abe0
0x42053d68 - anon.6f8d54fb548d5ff1abf9d01d3f110dc8.67.llvm.17408016719535564914
    at ??:??
0x4080a194 - _ZN3std9panicking4HOOK17hbc435311aff44f7fE
    at ??:??
0x4080f3f0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200b2d2 - std::sys::unix::thread_local_key::get
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread_local_key.rs:22
0x00000001 - ??
    at ??:??
0x4081011c - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f400 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200abe0 - std::sys::common::thread_local::os_local::Key<T>::get
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/common/thread_local/os_local.rs:117
4080f3f0: 0x42053d68 0x4080a194 0x4080f410 0x42014af0 0x42053d68 0x4080a194 0x4080f480 0x4200aaf2
0x42053d68 - anon.6f8d54fb548d5ff1abf9d01d3f110dc8.67.llvm.17408016719535564914
    at ??:??
0x4080a194 - _ZN3std9panicking4HOOK17hbc435311aff44f7fE
    at ??:??
0x4080f410 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42014af0 - std::thread::local::LocalKey<T>::try_with
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:269
0x42053d68 - anon.6f8d54fb548d5ff1abf9d01d3f110dc8.67.llvm.17408016719535564914
    at ??:??
0x4080a194 - _ZN3std9panicking4HOOK17hbc435311aff44f7fE
    at ??:??
0x4080f480 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200aaf2 - core::fmt::Arguments::new_const
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs:325
4080f410: 0x00000804 0x00000054 0x00000000 0x00000000 0x00000000 0x4080f488 0x42053d58 0x4080f4f0
0x00000804 - ??
    at ??:??
0x00000054 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x4080f488 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42053d58 - anon.6f8d54fb548d5ff1abf9d01d3f110dc8.67.llvm.17408016719535564914
    at ??:??
0x4080f4f0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
4080f430: 0x4205013c 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x40810090 0x00000000
0x4205013c - esp_app_desc
    at ??:??
0x00000001 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x40810090 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x00000000 - ??
    at ??:??
4080f450: 0x4080f4a8 0x4080f4d4 0x4080f4a0 0x00000000 0x00000000 0x00000000 0x00000000 0x4205013c
0x4080f4a8 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f4d4 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f4a0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x4205013c - esp_app_desc
    at ??:??
4080f470: 0x4080f4f0 0x4080f4d4 0x4080f4a0 0x4200a8b2 0x00000005 0x00000005 0x42050120 0x00000005
0x4080f4f0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f4d4 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f4a0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200a8b2 - std::panicking::rust_panic_with_hook
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:734
0x00000005 - ??
    at ??:??
0x00000005 - ??
    at ??:??
0x42050120 - esp_app_desc
    at ??:??
0x00000005 - ??
    at ??:??
4080f490: 0x4080f554 0x4080f4d4 0x4080f4b0 0x42009f9e 0x4080ff60 0x00000005 0x4080f4d0 0x4200a6c0
0x4080f554 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f4d4 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f4b0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42009f9e - std::sys_common::backtrace::output_filename
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:182
0x4080ff60 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x00000005 - ??
    at ??:??
0x4080f4d0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200a6c0 - std::panicking::begin_panic_handler::FormatStringPayload::fill
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:604
4080f4b0: 0x4080f4f0 0x4080f4d4 0x4205013c 0x00000000 0x4080f554 0x4205014c 0x4080f4f0 0x4203b7e0
0x4080f4f0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f4d4 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4205013c - esp_app_desc
    at ??:??
0x00000000 - ??
    at ??:??
0x4080f554 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4205014c - anon.31793b6a68ab95f21ed38357dc39dbc2.0.llvm.17985776555296093392
    at ??:??
0x4080f4f0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4203b7e0 - core::panicking::panic_nounwind_fmt
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:86
4080f4d0: 0x4080a260 0x420649c0 0x420649c0 0x4080f4f0 0x4205013c 0x40800001 0x4080f510 0x42000082
0x4080a260 - s_log_cache
    at ??:??
0x420649c0 - str.3
    at ??:??
0x420649c0 - str.3
    at ??:??
0x4080f4f0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4205013c - esp_app_desc
    at ??:??
0x40800001 - _vector_table
    at ??:??
0x4080f510 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42000082 - main
    at ??:??
4080f4f0: 0x42050128 0x00000001 0x42050120 0x00000000 0x00000000 0x00000000 0x4080f520 0x4200002a
0x42050128 - esp_app_desc
    at ??:??
0x00000001 - ??
    at ??:??
0x42050120 - esp_app_desc
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x4080f520 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200002a - std::sys_common::backtrace::__rust_begin_short_backtrace
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:161
4080f510: 0x00000000 0x4205014c 0x4080f530 0x420000ea 0x4080f564 0x4080ff28 0x4080f550 0x4201d7bc
0x00000000 - ??
    at ??:??
0x4205014c - anon.31793b6a68ab95f21ed38357dc39dbc2.0.llvm.17985776555296093392
    at ??:??
0x4080f530 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x420000ea - std::rt::lang_start::{{closure}}
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:166
0x4080f564 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080ff28 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080f550 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4201d7bc - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:284
4080f530: 0x4080f564 0x00000000 0x420504ec 0x4204a500 0x00000000 0x00000000 0x4080f560 0x420000d0
0x4080f564 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x00000000 - ??
    at ??:??
0x420504ec - anon.4c80ffe46e56309831a0959317c5d78b.174.llvm.13294485414787255219
    at ??:??
0x4204a500 - s_sar_power_release
    at /home/timo/esp/esp-idf/components/esp_hw_support/port/esp32c6/sar_periph_ctrl.c:74
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x4080f560 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x420000d0 - std::rt::lang_start
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:172
4080f550: 0x420694e0 0x42000032 0x00000000 0x4204a5e4 0x00000000 0x00001388 0x00000001 0x00000000
0x420694e0 - anon.d29e10f3af975f47e7d468438dff114e.33.llvm.12020091497156391816
    at ??:??
0x42000032 - backtrace_std::main
    at /tmp/backtrace-std/src/main.rs:13
0x00000000 - ??
    at ??:??
0x4204a5e4 - main_task
    at /home/timo/esp/esp-idf/components/freertos/app_startup.c:209
0x00000000 - ??
    at ??:??
0x00001388 - ??
    at ??:??
0x00000001 - ??
    at ??:??
0x00000000 - ??
    at ??:??
4080f570: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
4080f590: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
0x00000000 - ??
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
4080f5b0: 0x00000154 0x4080f170 0x00000000 0x4080a410 0x4080a410 0x4080f5b4 0x4080a408 0x00000018
0x00000154 - ??
    at ??:??
0x4080f170 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x00000000 - ??
    at ??:??
0x4080a410 - pxReadyTasksLists
    at ??:??
0x4080a410 - pxReadyTasksLists
    at ??:??
0x4080f5b4 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080a408 - pxReadyTasksLists
    at ??:??
0x00000018 - ??
    at ??:??
4080f5d0: 0x00000000 0x00000000 0x4080f5b4 0x00000000 0x00000001 0x4080d470 0x6e69616d 0x00000000
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x4080f5b4 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x00000000 - ??
    at ??:??
0x00000001 - ??
    at ??:??
0x4080d470 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x6e69616d - s_rtc_timer_retain_mem
    at ??:??
0x00000000 - ??
    at ??:??
4080f5f0: 0x00000000 0x00000000 0x00000000 0x4080f5a0 0x00000001 0x00000000 0x408100b4 0x4203dbb4
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x4080f5a0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x00000001 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x408100b4 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4203dbb4 - pthread_cleanup_thread_specific_data_callback
    at /home/timo/esp/esp-idf/components/pthread/pthread_local_storage.c:126
4080f610: 0x00000000 0x4080bcd0 0x4080bd38 0x4080bda0 0x00000000 0x00000000 0x00000001 0x00000000
0x00000000 - ??
    at ??:??
0x4080bcd0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080bd38 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080bda0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000001 - ??
    at ??:??
0x00000000 - ??
    at ??:??
4080f630: 0x00000000 0x00000000 0x42041e48 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x42041e48 - esp_cleanup_r
    at /home/timo/esp/esp-idf/components/newlib/newlib_init.c:60
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
4080f650: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
4080f670: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
4080f690: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
4080f6b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
4080f6d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
4080f6f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000600 0xa5a5a5a5
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000000 - ??
    at ??:??
0x00000600 - ??
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
4080f710: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??
0xa5a5a5a5 - s_rtc_timer_retain_mem
    at ??:??

if CONFIG_ESP_SYSTEM_USE_EH_FRAME=y is added to sdkconfig.defaults the output looks like this:


thread 'main' panicked at src/main.rs:11:5:
oh no
stack backtrace:

abort() was called at PC 0x42044d2d on core 0
Backtrace: 0x40800eba:0x4080f1a0 0x4080413e:0x4080f1a0 0x40807e6c:0x4080f1b0 0x42044d2e:0x4080f220 0x4201edae:0x4080f230 0x4200ab30:0x4080f240 0x42038d74:0x4080f2b0 0x42020414:0x4080f300 0x4200aa0e:0x4080f320 0x4200b026:0x4080f370 0x4200aee8:0x4080f3d0 0x4200b66a:0x4080f460 0x4200b4de:0x4080f4d0 0x4200abca:0x4080f4f0 0x4200b2ec:0x4080f500 0x4203d740:0x4080f520 0x42000210:0x4080f540 0x42000220:0x4080f5e0 0x42000230:0x4080f5f0 0x4200026c:0x4080f600 0x4200003e:0x4080f610 0x420002ea:0x4080f620 0x4201e8e6:0x4080f630 0x420002d0:0x4080f650 0x4204d0e8:0x4080f660 0xfffffffe:0x4080f680
Backtrace ended abruptly: cannot find DWARF information for instruction at address 0xfffffffe

and is expanded to something like this:

click to expand
...
thread 'main' panicked at src/main.rs:11:5:
oh no
stack backtrace:

abort() was called at PC 0x42044d2d on core 0
0x42044d2d - abort_return<int>
    at /home/timo/esp/esp-idf/components/cxx/cxx_exception_stubs.cpp:33
Backtrace: 0x40800eba:0x4080f1a0 0x4080413e:0x4080f1a0 0x40807e6c:0x4080f1b0 0x42044d2e:0x4080f220 0x4201edae:0x4080f230 0x4200ab30:0x4080f240 0x42038d74:0x4080f2b0 0x42020414:0x4080f300 0x4200aa0e:0x4080f320 0x4200b026:0x4080f370 0x4200aee8:0x4080f3d0 0x4200b66a:0x4080f460 0x4200b4de:0x4080f4d0 0x4200abca:0x4080f4f0 0x4200b2ec:0x4080f500 0x4203d740:0x4080f520 0x42000210:0x4080f540 0x42000220:0x4080f5e0 0x42000230:0x4080f5f0 0x4200026c:0x4080f600 0x4200003e:0x4080f610 0x420002ea:0x4080f620 0x4201e8e6:0x4080f630 0x420002d0:0x4080f650 0x4204d0e8:0x4080f660 0xfffffffe:0x4080f680
0x40800eba - panic_abort
    at /home/timo/esp/esp-idf/components/esp_system/panic.c:472
0x4080f1a0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4080413e - esp_system_abort
    at /home/timo/esp/esp-idf/components/esp_system/port/esp_system_chip.c:93
0x4080f1a0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x40807e6c - abort
    at /home/timo/esp/esp-idf/components/newlib/abort.c:38
0x4080f1b0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42044d2e - abort_return<int>
    at /home/timo/esp/esp-idf/components/cxx/cxx_exception_stubs.cpp:33
0x4080f220 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4201edae - std::backtrace_rs::backtrace::libunwind::trace
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104
0x4080f230 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200ab30 - std::sys_common::backtrace::_print_fmt
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:68
0x4080f240 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42038d74 - core::fmt::rt::Argument::fmt
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/rt.rs:142
0x4080f2b0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42020414 - std::io::Write::write_fmt
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/io/mod.rs:1810
0x4080f300 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200aa0e - std::sys_common::backtrace::_print
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:47
0x4080f320 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200b026 - std::panicking::default_hook::{{closure}}
    at ??:??
0x4080f370 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200aee8 - std::panicking::default_hook
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:292
0x4080f3d0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200b66a - std::panicking::rust_panic_with_hook
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:779
0x4080f460 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200b4de - std::panicking::begin_panic_handler::{{closure}}
    at ??:??
0x4080f4d0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200abca - std::sys_common::backtrace::__rust_end_short_backtrace
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:171
0x4080f4f0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200b2ec - rust_begin_unwind
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:645
0x4080f500 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4203d740 - core::panicking::panic_fmt
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:72
0x4080f520 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42000210 - backtrace_std::c
    at /tmp/backtrace-std/src/main.rs:11
0x4080f540 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42000220 - backtrace_std::b
    at /tmp/backtrace-std/src/main.rs:16
0x4080f5e0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x42000230 - backtrace_std::a
    at /tmp/backtrace-std/src/main.rs:20
0x4080f5f0 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200026c - backtrace_std::main
    at /tmp/backtrace-std/src/main.rs:28
0x4080f600 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4200003e - core::ops::function::FnOnce::call_once
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
0x4080f610 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x420002ea - std::rt::lang_start::{{closure}}
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:166
0x4080f620 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4201e8e6 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:284
0x4080f630 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x420002d0 - std::rt::lang_start
    at /home/timo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:165
0x4080f650 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0x4204d0e8 - main_task
    at /home/timo/esp/esp-idf/components/freertos/app_startup.c:208
0x4080f660 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
0xfffffffe - s_rtc_timer_retain_mem
    at ??:??
0x4080f680 - _ZN12_GLOBAL__N_110eh_globalsE
    at ??:??
Backtrace ended abruptly: cannot find DWARF information for instruction at address 0xfffffffe
0xfffffffe - s_rtc_timer_retain_mem
    at ??:??

In both cases a the auto-decoding adds a lot of noise and makes the output unreadable.

Can we improve this?

(related esp-rs/esp-idf-sys#275 )

@SergioGasquez
Copy link
Member

According to the latest comments of esp-rs/esp-idf-sys#275, we can close this issue as there is no-trivial solution that can be implemented in espflash for this, right @t-moe?

@t-moe t-moe closed this as completed Jan 31, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Jan 31, 2024
@t-moe t-moe reopened this Jan 31, 2024
@github-project-automation github-project-automation bot moved this from Done to In Progress in esp-rs Jan 31, 2024
@t-moe t-moe closed this as not planned Won't fix, can't repro, duplicate, stale Jan 31, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in esp-rs Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants