rust-embedded/discovery

5.3 'Debug It' gdb could not load XML target description

kjsuarez opened this issue · 1 comments

While working through 5.3 on a microbit:v2 I can gdb into the target, but the session starts me at 0x00000000 in __vector_table and continuing never hits the breakpoint at main.
Appears to be very similar to this issue

$ gdb target/thumbv7em-none-eabihf/debug/led-roulette
...
Reading symbols from target/thumbv7em-none-eabihf/debug/led-roulette...
(gdb) target remote :1337
Remote debugging using :1337
warning: while parsing target description (at line 4): Target description specified unknown architecture "armv7"
warning: Could not load XML target description; ignoring
0x00000000 in __vector_table ()
(gdb) break main
Breakpoint 1 at 0x15c: file src/05-led-roulette/src/main.rs, line 9.
(gdb) continue
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.

next never leaves vector_table

0x00000000 in __vector_table ()
(gdb) next
Single stepping until exit from function __vector_table,
which has no line number information.

Program received signal SIGINT, Interrupt.
0x00000000 in __vector_table ()
(gdb)

I'm running cargo embed from microbit/src/05-led-roulette and have tried running gdb from both microbit/src/05-led-roulette and microbit directories with identical results.

Thank you, any help appreciated.

Solved.

I'm working from wsl (5.15.90.1-microsoft-standard-WSL2) via Windows 10, for the record.
I was apparently using the wrong gdb command. I have gdb-multiarch installed per the setup instructions in 3.1 but I was using gdb instead of gdb-multiarch.
$ gdb target/thumbv7em-none-eabihf/debug/led-roulette from the microbit dir fails as shown above.
$ gdb-multiarch target/thumbv7em-none-eabihf/debug/led-roulette from the microbit dir behaves as described in book.