5 https://git.automotivelinux.org/src/xds/xds-docs/plain/docs/part-1/debug-configuration.md?h=master
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/xds-docs-guides-devguides-book.yml -->
12 Debug configuration (i.e. `xds-gdb`) is defined by variables.
13 You can see the variables used further down in this section.
15 You can set these variables using a number of methods:
17 - Environment variables that are inherited.
19 - Configuration file pointed to by the `XDS_CONFIG` environment variable
20 (e.g. `XDS_CONFIG=/tmp/my_xds_gdb_config.env xds-gdb`).
22 - A GDB "init" command file.
24 - A "user" configuration file located in one of the following
25 areas, which are order-dependent:
27 1. `$(CURRENT_DIRECTORY)/.xds-gdb.env`
29 1. `$(CURRENT_DIRECTORY)/../xds-gdb.env`
31 1. `$(CURRENT_DIRECTORY)/target/xds-gdb.env`
33 1. `$(HOME)/.config/xds/xds-gdb.env`
35 ## Configuration Variables
37 This section describes the `XDS_*` configuration variables.
38 As previously mentioned, you can define these variables as
39 described in the previous section.
43 Sets the logging level.
44 Levels include "panic", "fatal", "error", "warn", "info", and "debug".
48 Sets the logging file.
49 The default is `/tmp/xds-gdb.log`.
53 Specifies to use native GDB mode rather than remote XDS mode.
55 - `XDS_PROJECT_ID` *(mandatory in XDS mode)*
57 The project ID you want to build.
61 The relative path to the project.
63 - `XDS_SDK_ID` *(mandatory in XDS mode)*
65 Cross SDK ID to use to build project
69 The local XDS agent URL.
70 The default is `http://localhost:8800`.
72 ## Configuration Using `XDS_CONFIG`
74 As mentioned, you can define configuration variables in
75 a file you point to with the `XDS_CONFIG` variable.
79 XDS_CONFIG=/tmp/my_xds_gdb_config.env xds-gdb
82 Variables defined in this file overwrite any inherited
83 environment variables.
84 When you define a variable in the file, you can prefix the
85 assignment with the "export" string.
86 Doing so causes the variable to be exported to the environment.
88 Following is an example of a configuration file pointed
89 to by the `XDS_CONFIG` variable.
90 These commands create the `xds-gen3.conf` configuration file
91 in the `$MY_PROJECT_DIR` directory:
94 # MY_PROJECT_DIR=/home/seb/xds-workspace/helloworld-native-application
95 cat > $MY_PROJECT_DIR/xds-gen3.conf << EOF
96 export XDS_AGENT_URL=localhost:8800
97 export XDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b
98 export XDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03
102 ## Configuration Using GDB Init
104 GDB is a versatile debugger and can be run with many options.
105 One such option is to execute a GDB "init" file upon startup.
106 You do this by using the "--command" or "-x" command-line options
107 and providing the name of the init file.
109 <!-- section-note -->
112 - For information on debugging with GDB, see
113 "[Debugging with GDB](https://www.sourceware.org/gdb/onlinedocs/gdb.html)".
115 - For information on GDB init files, see
116 "[Command files](https://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_node/gdb_190.html)".
117 <!-- end-section-note -->
119 When you create an init file, it must conform to the following
120 syntax (i.e. inclusion of what are normally commenting characters
121 as well as use of the `:XDS-ENV:` tag).
123 Following is an example init file that defines the `XDS_PROJECT_ID`
124 and `XDS_SDK_ID` variables:
127 # :XDS-ENV: XDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b
128 # :XDS-ENV: XDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03