I have two projects with embedded target (
thumbv7m-none-eabi). Both of them has the following problem:
cargo run is set to execute
gdb, this is common practice in embedded projects:
runner = "arm-none-eabi-gdb -q -x openocd.gdb"
When I run
gdb fails with the following error on the first line of
break statement (i.e.
Dwarf Error: Cannot find DIE at 0x922 referenced from DIE at 0x79b7 [in module (executable)]
And this only occurs in
debug builds, on
release builds it does not occur. Also, if there's no
break statements in gdb script, it does not occur too.
nm does not show
DIE both in debug and release binaries.
opt-level = "s" and
lto = true in dev profile.