1 # gdb-remote.init file for IDE
2 # Object: allow to use standard gdb to remote debug a target
3 # Usage: remote-target-populate update script under ./build directory
4 # Author: Fulup Ar Foll (IoT.bzh)
5 # Reference: https://blog.flameeyes.eu/2010/02/remote-debugging-with-gdb-part-2-gdb/
7 # Warning: In remote native mode netbeans impose debug-command to point on a local instance of afb-daemon binary
9 # Fulup Hoops: --ldpath should be absolute as solib-search-path refuse to work as documented
11 # Start gdbserver on target and connect through SSH link WARNING:
12 target remote | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null @RSYNC_TARGET@ gdbserver - afb-daemon --port=@AFB_REMPORT@ --workdir=$HOME/@RSYNC_PREFIX@/@PROJECT_NAME@ --roothttp=htdocs --ldpaths=$HOME/@RSYNC_PREFIX@/@PROJECT_NAME@/lib --verbose --token=@AFB_TOKEN@
14 # Disable auto answer no on questions and to set breakpoint
17 # Disable auto load of libraries to improved perf
18 set auto-solib-add off
20 # Define path for project libraries
21 set solib-search-path ${PROJECT_PKG_BUILD_DIR}
23 # Replace run by continue (gdb use 'run' when gdbserver wants 'continue')
28 # Manually load project libraries when loaded by afb-daemon
29 tbreak @GDB_INITIAL_BREAK@
31 sharedlibrary @RSYNC_PREFIX@/@PROJECT_NAME@