I use a cross-compile
tool, compile a huge Android
project to Unbuntu
executable format app_host
.
app_host
can run correctly on my Ubuntu
system.gdb app_host
,the gdb
show below error.$ gdb host_app
BFD: app_host: unable to initialize decompress status for section .debug_loclists
app_host: not in executable format: file format not recognized
I guess the error may caused by the host_app
and gdb
have have different for Linux version
argument.
app_host:for GNU/Linux 2.6.24
gdb :for GNU/Linux 3.2.0
Below is my system info:
$file app_host
app_host: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[xxHash]=202a2dfb56159065, with debug_info, not stripped
$file /usr/bin/gdb
/usr/bin/gdb: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=f5f8723dbedf08022a36e8449e29e717e6547316, for GNU/Linux 3.2.0, stripped
$uname -a
Linux comsh01136017 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
$ hostnamectl
Static hostname: name001
Icon name: computer-server
Chassis: server
Machine ID: 68d323e37bdd43a5a0473de5ed07161e
Boot ID: 8967adefb93a49fbbb96cc8ad089a221
Operating System: Ubuntu 22.04.5 LTS
Kernel: Linux 5.15.0-133-generic
Architecture: x86-64
Hardware Vendor: Dell Inc.
Hardware Model: PowerEdge R740xd
Would someone help me solve the error.
Someone told me the solution:
"I think these warnings mean that your gdb
& readelf
are built without zstd
support.
zstd
support was added in gdb-13
, and the above info says version 12.1
, so you need to udpate."
Afther I install gdb-13.1
, It works well.
Android_15$ gdb_13_1 ./malisc_host //OK, gdb_13_1 works well