summaryrefslogtreecommitdiffstats
path: root/docs/part-1/debug-cmd-line.md
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2019-05-07 12:44:20 -0700
committerScott Rifenbark <srifenbark@gmail.com>2019-05-21 21:57:37 +0000
commit6bbc4ed292b187a26537fafc5a206d1d1765727e (patch)
treef5a631e2c7fcf9f16625fc00fb2b1c5264355c75 /docs/part-1/debug-cmd-line.md
parent3635b88a18de43bbdd2373259ac65c02bc63c139 (diff)
Renamed XDS Debug files, update devguides-book.yml
For guppy, I renamed the XDS debug procedure files. Also, Removed three files that are not used. I updated the devguides-book.yml file to use the "guppy" version. Change-Id: I623ce1b6021c419742c3a5c311fc5240867660fe Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Diffstat (limited to 'docs/part-1/debug-cmd-line.md')
-rw-r--r--docs/part-1/debug-cmd-line.md69
1 files changed, 69 insertions, 0 deletions
diff --git a/docs/part-1/debug-cmd-line.md b/docs/part-1/debug-cmd-line.md
new file mode 100644
index 0000000..4d2ca84
--- /dev/null
+++ b/docs/part-1/debug-cmd-line.md
@@ -0,0 +1,69 @@
+# Debug using xds-gdb from command line
+
+## XDS remote debugging mode
+
+First the project you want to debug must be declared on an xds-server and this
+project may also has been built using using XDS (see [Create your first AGL application](./4_build-first-app.html) for more details).
+
+So to debug it you need to have the XDS agent - server chain in place and
+you also need the project and sdk unique id.
+
+You can find these IDs in project page of XDS dashboard or you can get them from command line using the `--list` option.
+
+This option lists all existing projects ID:
+
+```bash
+xds-gdb --list
+```
+
+Now to refer your project, just set `XDS_PROJECT_ID` and `XDS_SDK_ID` variables.
+
+You are now ready to use `xds-gdb` to for example cross debug your project.
+
+Here is an example to build and debug a project based on CMakefile and
+[cmake-apps-module](https://git.automotivelinux.org/src/cmake-apps-module/):
+
+```bash
+# Go into your project directory (for example helloworld-native-application)
+cd ~/xds-workspace
+git clone https://github.com/iotbzh/helloworld-native-application.git
+cd helloworld-service
+
+# Declare your project on xds-server
+# <for now, you can only do this step using xds HTML dashboard (see xds-server doc)>
+
+# Define XDS config
+cat <<EOF >./xds-config.env
+#optional if not default value: XDS_AGENT_URL=http://localhost:8800
+XDS_PROJECT_ID=IW7B4EE-DBY4Z74_myProject
+XDS_SDK_ID=poky-agl_aarch64_4.0.1
+EOF
+
+# Tell to xds-cli and xds-gdb which is your config file
+export XDS_CONFIG=../xds-gen3.conf
+
+# Create a new build directory
+mkdir build && cd build
+
+# Start remote cross build
+xds-cli exec -- cmake -DRSYNC_TARGET=root@myTarget ..
+xds-cli exec -- make
+xds-cli exec -- make remote-target-populate
+
+# Start debugging
+xds-gdb -x target/gdb-on-root@myTarget.ini
+```
+
+<!-- section-note -->
+**Note:** : [helloworld-native-application](https://github.com/iotbzh/helloworld-native-application) project is an AGL
+project based on [cmake-apps-module](https://git.automotivelinux.org/src/cmake-apps-module/)
+(refer to install cmake module [instructions](../../cmakeafbtemplates/dev_guide/installing-cmake.html)). This CMake templating, used to develop application
+with the AGL Application Framework, will automatically generate makefile rules
+(eg. `remote-target-populate`) or scripts (eg. `build/target/xxx` scripts).
+
+For more info about app-template, please refer to [this documentation](../../../#using-the-cmake-applications-module).
+<!-- end-section-note -->
+
+## Native debugging
+
+To enable native debugging mode, you need to define `XDS_NATIVE_GDB` variable.