About gdbserver question

I use WSL2 for ubuntu 20.04 to debugging openwrt embedded development board by gdbserver. But it always show "Connection timed out". What can I do?

  • embedded development board command:

    gdbserver 192.168.50.100:3000 helloworld


  • The gdb in WSL2 is from:

    staging_dir/toolchain-mips*/bin/mips-openwrt-linux-gdb

  • WSL2 command:

    $ ./mips-openwrt-linux-gdb
    (gdb) target remote 192.168.50.100:3000

I have always used the remote debugging by

  • just specifying the port and the command at the OpenWrt device:
    gdbserver :9000 collectd -f
  • using the wrapper script in OpenWrt buildroot to launch the debugging and also provide the path to the unstripped binary in staging_dir:
    ./scripts/remote-gdb 192.168.1.1:9000 ./staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/usr/sbin/collectd

( The script sets some additional gdb parameters: https://github.com/openwrt/openwrt/blob/main/scripts/remote-gdb )

1 Like

Thank you!!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.