Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gdbserver: Target description specified unknown architecture "aarch64"

I try to use remotely the gdbserver for debug as follows

Start the gdbserver on target machine

$ gdbserver localhost:2000 hello -l 20 -b 10 --enable-targets=all

Host machine has the program binary with debugging enabled

"copied binary from ARM target to host" 

Run gdb on host machine

$ gdb -q --args hello --enable-target=all

Connect to the target

(gdb) target remote 192.168.15.132
192.168.15.132: No such file or directory.
(gdb) target remote 192.168.15.132:2000
Remote debugging using 192.168.15.132:2000
warning: while parsing target description (at line 11): Target description specified unknown architecture "aarch64"
warning: Could not load XML target description; ignoring
Remote register badly formatted: T051d:0000000000000000;1f:80fcffffffff0000;20:403cfdb7ffff0000;thread:pd60.d60;core:1;
here: 00000000;1f:80fcffffffff0000;20:403cfdb7ffff0000;thread:pd60.d60;core:1;
(gdb) q

I am looking for an advice to correctly debug with ARM remote target.

like image 464
user3428154 Avatar asked Nov 28 '18 17:11

user3428154


1 Answers

To debug executables compiled for a different architecture, install gdb-multiarch and run gdb-multiarch instead of gdb. Different distributions compile gdb differently and some even lack the multiarch version in their repositories - RHEL doesn't include it, but it's present in Ubuntu and Debian.

like image 158
Syfer Polski Avatar answered Oct 22 '22 02:10

Syfer Polski