
.Build with debugging enabled
--------------------------------------------------------------------------------
make package/feeds/libremesh/shared-state-async/clean package/feeds/libremesh/shared-state-async/compile -j$(nproc) CONFIG_DEBUG=y
--------------------------------------------------------------------------------

.Copy on verde e blu
--------------------------------------------------------------------------------
scp -O bin/packages/mips_24kc/libremesh/shared-state-async_*.ipk root@[fe80::ea94:f6ff:fe68:3364%usbe1]:/tmp/
scp -O bin/packages/mips_24kc/libremesh/shared-state-async_*.ipk root@[fe80::6670:2ff:fede:c51e%usbe1]:/tmp/
--------------------------------------------------------------------------------

.Install
--------------------------------------------------------------------------------
opkg install --force-reinstall /tmp/shared-state-async_*.ipk
--------------------------------------------------------------------------------

.Run with gdb
--------------------------------------------------------------------------------
gdbserver :9000 shared-state-async
--------------------------------------------------------------------------------

.Attach with remote OpenWrt gdb
--------------------------------------------------------------------------------
scripts/remote-gdb [fe80::ea94:f6ff:fe68:3364%usbe0]:9000 ./build_dir/target-mips_24kc_musl/shared-state-async-*/shared-state-async

scripts/remote-gdb [fe80::6670:2ff:fede:c51e%usbe0]:9000 ./build_dir/target-mips_24kc_musl/shared-state-async-*/shared-state-async
break shared-state-async.cc:55
run listen
run sync bat-hosts fe80::ea94:f6ff:fe68:3364%br-lan
run sync bat-hosts fe80::d237:45ff:fefc:3cdd%br-lan
--------------------------------------------------------------------------------

.Stressing the server
--------------------------------------------------------------------------------
while Builds/build-lime-shared-state-async-node-Desktop-Debug/shared-state-async sync bat-hosts fe80::ea94:f6ff:fe68:3364%usbeth0; do echo ------------------------------------------------------------------- ;done

while shared-state-async sync bat-hosts fe80::ea94:f6ff:fe68:3364%br-lan; do echo ------------------------------------------------------------------- ;done

--------------------------------------------------------------------------------


=== Interesting Readings

https://openwrt.org/docs/guide-developer/gdb

VoCore2: Develop for OpenWrt on Qt Creator
https://vonger.cn/?p=14657

