## target
/ # gdbserver --multi localhost:1234
Listening on port 1234
Remote debugging from host 10.213.0.8
Attached; pid = 379 <<<<<<<< gdb client connect
[lake@localhost]$ cat ~/.gdbinit
set target-async 1 ### https://www.youtube.com/watch?v=SnouzHI9bis
set pagination off
set non-stop on
target extended-remote IP_TARGET_BOARD:PORT_TARGET_BOARD_GDBSERVER ## https://sourceware.org/gdb/current/onlinedocs/gdb/Connecting.html
attach 379 &
[lake@localhost]$
[lhu3@zch127bld08 recording]$aarch64-linux-gnu-gdb ./rservice
GNU gdb (GDB) 7.10
Copyright (C) 2015 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-unknown-linux-gnu --target=aarch64-kreatv-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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"...
[New Thread 379.379]
[New Thread 379.381]
Reading symbols from ./rservice...done.
(gdb) Reading /lib64/libpthread.so.0 from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /usr/lib64/libcrypto.so.1.0.0 from remote target...
..............
Reading /lib/ld-linux-aarch64.so.1 from remote target...
(gdb)
(gdb) info thread
Id Target Id Frame
2 Thread 379.381 (running)
* 1 Thread 379.379 (running)
(gdb)
Refer
https://blog.youkuaiyun.com/zb872676223/article/details/37906091
https://blog.youkuaiyun.com/nirendao/article/details/103302950
https://sourceware.org/gdb/current/onlinedocs/gdb/Connecting.html