From bbbe9c168526bbb729022f9de903aff5690b328d Mon Sep 17 00:00:00 2001 From: Johann CAHIER Date: Tue, 9 Oct 2018 10:45:08 +0200 Subject: Improves documentation * Describes better available source tree sharing method (between xds-agent and xds-server), and which to prefer depending on the deployment setup. * Gives indication about how to pass RSYNC_TARGET and RSYNC_PREFIX env vars to the helloworld-native-application build process. * Swap chapter order (build before config) Change-Id: Ie4c22f277a59b0405744d71b0fadff67c5d5d025 Signed-off-by: Johann CAHIER --- docs/part-2/4_xds-gdb/0_abstract.md | 4 +- docs/part-2/4_xds-gdb/1_build.md | 39 +++++++++++++++++ docs/part-2/4_xds-gdb/1_config.md | 86 ------------------------------------- docs/part-2/4_xds-gdb/2_build.md | 39 ----------------- docs/part-2/4_xds-gdb/2_config.md | 86 +++++++++++++++++++++++++++++++++++++ 5 files changed, 127 insertions(+), 127 deletions(-) create mode 100644 docs/part-2/4_xds-gdb/1_build.md delete mode 100644 docs/part-2/4_xds-gdb/1_config.md delete mode 100644 docs/part-2/4_xds-gdb/2_build.md create mode 100644 docs/part-2/4_xds-gdb/2_config.md (limited to 'docs/part-2/4_xds-gdb') diff --git a/docs/part-2/4_xds-gdb/0_abstract.md b/docs/part-2/4_xds-gdb/0_abstract.md index d282efa..e5f0c25 100644 --- a/docs/part-2/4_xds-gdb/0_abstract.md +++ b/docs/part-2/4_xds-gdb/0_abstract.md @@ -19,6 +19,6 @@ variable to use native gdb debug mode instead. Links to subchapters : -- [Configuration](./1_config.html) -- [Build from scratch](./2_build.html) +- [Build from scratch](./1_build.html) +- [Configuration](./2_config.html) - [Debugging](./3_debug.html) diff --git a/docs/part-2/4_xds-gdb/1_build.md b/docs/part-2/4_xds-gdb/1_build.md new file mode 100644 index 0000000..9ec91b3 --- /dev/null +++ b/docs/part-2/4_xds-gdb/1_build.md @@ -0,0 +1,39 @@ +# How to build xds-gdb from scratch + +## Dependencies + +Install [Go](https://golang.org/doc/install) and some other tools. + +Refer to [Prerequisites chapter](../1_Prerequisites.html) for more details. + +## Building + +Clone sources under `$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds/xds-gdb` +in order respect directory hierarchy that match Go package import logic (see +[How to Write Go Code](https://golang.org/doc/code.html) for more details). + +Then use delivered Makefile : + +```bash +# Declare ROOTDIR, can be any location (for example xds-build) +ROOTDIR=$HOME/xds-build + +# Create directory hierarchy that match Go package import logic +mkdir -p $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds +cd $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds + +# Clone sources +git clone https://gerrit.automotivelinux.org/gerrit/src/xds/xds-gdb +# or git clone ssh://YOUR_USERNAME@gerrit.automotivelinux.org:29418/src/xds/xds-gdb + +# Build xds-gdb +# (note that GOPATH will correctly be set by Makefile) +cd xds-gdb +make all +``` + +Generate xds-gdb package / tarball + +```bash +make package-all +``` diff --git a/docs/part-2/4_xds-gdb/1_config.md b/docs/part-2/4_xds-gdb/1_config.md deleted file mode 100644 index 8568f18..0000000 --- a/docs/part-2/4_xds-gdb/1_config.md +++ /dev/null @@ -1,86 +0,0 @@ -# Configuration - -`xds-gdb` configuration is defined by variables (see listed below). - -These variables may be set using: - -- environment variables (inherited), -- or a config file set with `XDS_CONFIG` environment variable, for example: - `XDS_CONFIG=/tmp/my_xds_gdb_config.env xds-gdb` -- or by setting variables within a gdb ini file (see details below), -- or a "user" config file located in following directory (first found is taken): - 1. $(CURRENT_DIRECTORY)/.xds-gdb.env - 1. $(CURRENT_DIRECTORY)/../xds-gdb.env - 1. $(CURRENT_DIRECTORY)/target/xds-gdb.env - 1. $(HOME)/.config/xds/xds-gdb.env - -## Configuration Variables - -`XDS_CONFIG` - -Config file defining `XDS_xxx` configuration variables. - -Variables of this file will overwrite inherited environment variables. - -Variables definition may be prefixed or not by "export" keyword. - -Here is an example of config file: - -```bash -cat $HOME/myProject/xds-gdb.env - -export XDS_AGENT_URL=http://localhost:8800 -export XDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b -export XDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03 -``` - -`XDS_LOGLEVEL` - -Set logging level - -Supported levels: - -- panic -- fatal -- error -- warn -- info -- debug - -`XDS_LOGFILE` - -Set logging file, default `/tmp/xds-gdb.log`. - -`XDS_NATIVE_GDB` - -Use native gdb mode instead of XDS mode. - -`XDS_PROJECT_ID` *(mandatory in XDS mode)* - -Project ID you want to build - -`XDS_RPATH` - -Relative path into project - -`XDS_SDK_ID` *(mandatory in XDS mode)* - -Cross Sdk ID to use to build project - -`XDS_AGENT_URL` - -Local XDS agent url (default `http://localhost:8800`) - -## Configuration variables set within gdb init command file - -Above `XDS_xxx` variables may also be defined within gdb init command file -(see --command or -x option of genuine Gdb). - -You must respect the following syntax: commented line including `:XDS-ENV:` tag - -Example of gdb init file where we define project and sdk ID: - -```bash - # :XDS-ENV: XDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b - # :XDS-ENV: XDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03 -``` diff --git a/docs/part-2/4_xds-gdb/2_build.md b/docs/part-2/4_xds-gdb/2_build.md deleted file mode 100644 index 9ec91b3..0000000 --- a/docs/part-2/4_xds-gdb/2_build.md +++ /dev/null @@ -1,39 +0,0 @@ -# How to build xds-gdb from scratch - -## Dependencies - -Install [Go](https://golang.org/doc/install) and some other tools. - -Refer to [Prerequisites chapter](../1_Prerequisites.html) for more details. - -## Building - -Clone sources under `$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds/xds-gdb` -in order respect directory hierarchy that match Go package import logic (see -[How to Write Go Code](https://golang.org/doc/code.html) for more details). - -Then use delivered Makefile : - -```bash -# Declare ROOTDIR, can be any location (for example xds-build) -ROOTDIR=$HOME/xds-build - -# Create directory hierarchy that match Go package import logic -mkdir -p $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds -cd $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds - -# Clone sources -git clone https://gerrit.automotivelinux.org/gerrit/src/xds/xds-gdb -# or git clone ssh://YOUR_USERNAME@gerrit.automotivelinux.org:29418/src/xds/xds-gdb - -# Build xds-gdb -# (note that GOPATH will correctly be set by Makefile) -cd xds-gdb -make all -``` - -Generate xds-gdb package / tarball - -```bash -make package-all -``` diff --git a/docs/part-2/4_xds-gdb/2_config.md b/docs/part-2/4_xds-gdb/2_config.md new file mode 100644 index 0000000..8568f18 --- /dev/null +++ b/docs/part-2/4_xds-gdb/2_config.md @@ -0,0 +1,86 @@ +# Configuration + +`xds-gdb` configuration is defined by variables (see listed below). + +These variables may be set using: + +- environment variables (inherited), +- or a config file set with `XDS_CONFIG` environment variable, for example: + `XDS_CONFIG=/tmp/my_xds_gdb_config.env xds-gdb` +- or by setting variables within a gdb ini file (see details below), +- or a "user" config file located in following directory (first found is taken): + 1. $(CURRENT_DIRECTORY)/.xds-gdb.env + 1. $(CURRENT_DIRECTORY)/../xds-gdb.env + 1. $(CURRENT_DIRECTORY)/target/xds-gdb.env + 1. $(HOME)/.config/xds/xds-gdb.env + +## Configuration Variables + +`XDS_CONFIG` + +Config file defining `XDS_xxx` configuration variables. + +Variables of this file will overwrite inherited environment variables. + +Variables definition may be prefixed or not by "export" keyword. + +Here is an example of config file: + +```bash +cat $HOME/myProject/xds-gdb.env + +export XDS_AGENT_URL=http://localhost:8800 +export XDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b +export XDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03 +``` + +`XDS_LOGLEVEL` + +Set logging level + +Supported levels: + +- panic +- fatal +- error +- warn +- info +- debug + +`XDS_LOGFILE` + +Set logging file, default `/tmp/xds-gdb.log`. + +`XDS_NATIVE_GDB` + +Use native gdb mode instead of XDS mode. + +`XDS_PROJECT_ID` *(mandatory in XDS mode)* + +Project ID you want to build + +`XDS_RPATH` + +Relative path into project + +`XDS_SDK_ID` *(mandatory in XDS mode)* + +Cross Sdk ID to use to build project + +`XDS_AGENT_URL` + +Local XDS agent url (default `http://localhost:8800`) + +## Configuration variables set within gdb init command file + +Above `XDS_xxx` variables may also be defined within gdb init command file +(see --command or -x option of genuine Gdb). + +You must respect the following syntax: commented line including `:XDS-ENV:` tag + +Example of gdb init file where we define project and sdk ID: + +```bash + # :XDS-ENV: XDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b + # :XDS-ENV: XDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03 +``` -- cgit 1.2.3-korg