Cannot find DIE at ... referenced from DIE

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 cargo run, gdb fails with the following error on the first line of openocd.gdb containing break statement (i.e. break rust_begin_unwind):

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.

I have opt-level = "s" and lto = true in dev profile.

This means rustc is generating buggy or incompatible debug information. File a bug about this on GitHub.