Отладка(gdb) на удаленном хосте. Несоответствие длины пакета ожидаемому

Появилась необходимость отлаживать программу, которая работает на удаленном хосте. Архитектура на удаленном хосте отличается от локального.

Remote:

uname -a 
Linux host_name 4.4.0-cip-rt-uc8400a+ #6 SMP Wed Apr 18 12:02:22 CST 2018 armv7l GNU/Linux

Locale:

uname -a
Linux pop-os 5.19.0-76051900-generic #202207312230~1663791054~22.04~28340d4 SMP PREEMPT_DYNAMIC Wed S x86_64 x86_64 x86_64 GNU/Linux

Для удаленной кросс отладки собрал gdb для соотвествтующего таргета:

./configure --target=arm-linux-gnueabihf

Запуск на таргет хосте:

gdbserver :54322 ./net_test 192.168.170.21 54321 0 10000
Process ./net_test created; pid = 28414
Listening on port 54322
Remote debugging from host 192.168.170.105

Запуск на локальном хосте:

~/programs/gdb_arm$ ./gdb/gdb --args /mirror/srv/BAS_deb/debootstrap/wheezy_UC8410A_chroot/projects/programming/net_test/net_test 192.168.170.21 54321 0 10000
GNU gdb (GDB) 13.0.50.20221111-git
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /mirror/srv/BAS_deb/debootstrap/wheezy_UC8410A_chroot/projects/programming/net_test/net_test...
(No debugging symbols found in /mirror/srv/BAS_deb/debootstrap/wheezy_UC8410A_chroot/projects/programming/net_test/net_test)
(gdb) target remote 192.168.170.21:54322
Remote debugging using 192.168.170.21:54322
warning: Can not parse XML target description; XML support was disabled at compile time
Reading /lib/ld-linux-armhf.so.3 from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /lib/ld-linux-armhf.so.3 from remote target...
Reading symbols from target:/lib/ld-linux-armhf.so.3...
Reading /usr/local/lib/debug/.build-id/b4/0c3daf67d7bfe1c1ab9b7686326406622ca5d9.debug from remote target...
Reading /lib/ld-2.19.so from remote target...
Reading /lib/.debug/ld-2.19.so from remote target...
Reading /usr/local/lib/debug//lib/ld-2.19.so from remote target...
Reading /usr/local/lib/debug/lib//ld-2.19.so from remote target...
Reading target:/usr/local/lib/debug/lib//ld-2.19.so from remote target...
(No debugging symbols found in target:/lib/ld-linux-armhf.so.3)
Reading /usr/local/lib/debug/.build-id/26/7d7a3979afecf340f80b9eb0b4b410d7a71464.debug from remote target...
(gdb) break main
Breakpoint 1 at 0x11f8a
(gdb) cont
Continuing.
Remote 'g' packet reply is too long (expected 168 bytes, got 328 bytes): f470fd76407d0200c0020000010000004cf9ff760100000070f5ff7648e8ff7e0200000098edff767c36010068f9ff7620f0ff7638e8ff7e8798fd76c829fe76300000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Бинарник собран под таргет. И там и там один и тот же

В чем причина этого несоответсвия?


Ответы (0 шт):