20c8d30eba30cc77e3885878894f0c04a6b0520a
[apps/agl-service-data-persistence.git] / ll-database-binding / conf.d / app-templates / template.d / 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 # Warning:
8 #  - on target start with $GDB ./target/gdb-cross-root@$TARGET.ini  
9 #  - Netbeans impose debug-command to point on a local instance of afb-daemon binary
10 #  - --ldpath should be absolute as solib-search-path refuse to work as documented
11
12 # xds-gdb annotation to point where it should 
13 # :XDS-ENV: XDS_PROJECT_ID=@XDS_PROJECT_ID@
14 # :XDS-ENV: XDS_SDK_ID=@XDS_SDK_ID@
15 # :XDS-ENV: XDS_SERVER_URL=@XDS_SERVER_URL@
16
17 # Start gdbserver on target and connect through SSH link WARNING:
18 target remote | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null @RSYNC_TARGET@ gdbserver - \
19        /usr/bin/afb-daemon --port=@AFB_REMPORT@ --workdir=@RSYNC_PREFIX@/@PROJECT_NAME@ --roothttp=htdocs --ldpaths=@RSYNC_PREFIX@/@PROJECT_NAME@/lib --verbose --token=@AFB_TOKEN@
20
21 # Disable auto answer no on questions and to set breakpoint
22 set confirm off
23
24 # Disable auto load of libraries to improved perf
25 set auto-solib-add off
26
27 # Define path for project libraries
28 set solib-search-path ${PROJECT_PKG_BUILD_DIR}
29
30 # Replace run by continue done by xds-gdb
31
32 # Manually load project libraries when loaded by afb-daemon
33 tbreak @GDB_INITIAL_BREAK@
34 commands
35 sharedlibrary @RSYNC_PREFIX@/@PROJECT_NAME@
36 continue
37 end
38
39