summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md65
1 files changed, 37 insertions, 28 deletions
diff --git a/README.md b/README.md
index bfaa315..676407e 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
-xds-gdb: wrapper on gdb for XDS
-=================================
+# xds-gdb: wrapper on gdb for XDS
`xds-gdb` is a wrapper on gdb debugger for X(cross) Development System.
@@ -7,50 +6,56 @@ This tool allows you to debug an application built with an xds-server without th
need to install gdb or any cross tool.
Two debugging models are supported:
- 1. XDS remote debugging requiring an XDS server and allowing cross debug your
+
+1. XDS remote debugging requiring an XDS server and allowing cross debug your
application.
- 2. native debugging
+1. native debugging
By default XDS remote debug is used and you need to define `XDS_NATIVE_GDB`
variable to use native gdb debug mode instead.
> **SEE ALSO**: [xds-server](https://github.com/iotbzh/xds-server), a web server
-used to remotely cross build applications.
-
+used to remotely cross build applications.
> **SEE ALSO**: [xds-exec](https://github.com/iotbzh/xds-exec),
wrappers on `exec` command that allows to cross build your application through `xds-server`.
## Getting Started
## Installing xds-gdb
+
Download latest `xds-gdb` release on [https://github.com/iotbzh/xds-gdb/releases](https://github.com/iotbzh/xds-gdb/releases).
Extract the tarball anywhere you want, for example:
-```
+
+```bash
mkdir -p ~/opt/bin
unzip -j $DOWNLOAD_DIR/xds-gdb_linux-amd64-v1.0.0.zip xds-gdb/xds-gdb ~/opt/bin
```
## Configuration
- `xds-gdb` configuration is defined by variables (see listed below).
+
+ `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:
+
+- 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
- 2. $(CURRENT_DIRECTORY)/../xds-gdb.env
- 3. $(CURRENT_DIRECTORY)/target/xds-gdb.env
- 4. $(HOME)/.config/xds/xds-gdb.env
+- 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:
+### 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
-```
+ prefixed or not by "export" keyword.
+ Here is an example of
+
+```bash
cat $HOME/myProject/xds-gdb.env
export XDS_SERVER_URL=http://xds-docker:8000
@@ -79,15 +84,15 @@ Cross Sdk ID to use to build project
`XDS_SERVER_URL` : *(mandatory with XDS server mode)*
Remote XDS server url
-
### 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).
+(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=IW7B4EE-DBY4Z74_myProject
# :XDS-ENV: XDS_SDK_ID=poky-agl_aarch64_3.99.1+snapshot
```
@@ -99,10 +104,12 @@ Example of gdb init file where we define project and sdk ID:
First the project you want to debug must be declared on an xds-server and this
project may also has been built using this xds-server (see [xds-server](https://github.com/iotbzh/xds-server) for more details).
-So to debug it you need to know the xds-server url (eg. http://xds-docker:8000),
+So to debug it you need to know the xds-server url (eg. <http://xds-docker:8000>),
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:
+option.
+This option lists all existing projects ID:
+
```bash
XDS_SERVER_URL=http://xds-docker:8000 xds-gdb --list
```
@@ -150,7 +157,6 @@ is an AGL project based on app-templates that can be build and debug using XDS.
To enable native debugging mode, you need to define `XDS_NATIVE_GDB` variable.
-
## Using xds-gdb within an IDE
### Netbeans
@@ -158,24 +164,27 @@ To enable native debugging mode, you need to define `XDS_NATIVE_GDB` variable.
__Netbeans 8.x :__
Open menu Tools -> Options
Then open C/C++ tab, in "Build Tools" sub-tab, click on "Add" button:
-![Add new tool panel](/docs/images/nb_newtool.jpeg)
+![Add new tool panel](/docs/images/nb_newtool.jpg)
Then, you should set *Debugger Command* to point to xds-gdb
-![Add new tool panel](/docs/images/nb_xds_options.jpeg)
+![Add new tool panel](/docs/images/nb_xds_options.jpg)
### Others IDE
-*Coming soon...*
+*Coming soon...*
## How to build xds-gdb from scratch
### Prerequisites
+
You must install and setup [Go](https://golang.org/doc/install) version 1.7 or
higher to compile this tool.
### Building
+
Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Makefile:
+
```bash
export GOPATH=$(realpath ~/workspace_go)
mkdir -p $GOPATH/src/github.com/iotbzh