52a33e2681ff715cf7ac78f289b09f658c0b0a0e
[staging/xdg-launcher.git] / gdb / gdb-on-target.ini.in
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/
6
7 # Start gdbserver on target and connect through SSH link
8 target remote | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null @RSYNC_TARGET@ gdbserver - afb-daemon --port=@AFB_REMPORT@ --workdir=@RSYNC_PREFIX@/@PROJECT_NAME@ --roothttp=./htdocs --ldpaths=./lib --verbose --token=@AFB_TOKEN@
9
10 # Disable auto answer no on questions and to set breakpoint
11 set confirm off
12
13 # Disable auto load of libraries to improved perf
14 set auto-solib-add off
15
16 # Define path for project libraries
17 set solib-search-path $ENV{PROJECT_DIR}/build/@PKGOUT_DIR@/lib
18
19 # Path substitution for source file names
20 set substitute-path @CMAKE_CURRENT_SOURCE_DIR@ $ENV{PROJECT_DIR}
21
22 # Replace run by continue (gdb use 'run' when gdbserver wants 'continue')
23 define run
24 continue
25 end
26
27 # Manually load project libraries when loaded by afb-daemon
28 break execute_command
29 commands
30 sharedlibrary @BINDINGS_REGEX@
31 continue
32 end