# Compile gdb with build.sh

gdb can be compiled by `build.sh` script on SW64 platform,
just run `./build.sh` to print help message, e.g.:

```shell
$ ./build.sh
================ help message ================
  ./build.sh [arg]
  release: Release version of gdb and gdbserver.
  debug  : Debug version of gdb and gdbserver.
  static : Static version of gdb and gdbserver.
  8A     : Release version for SW8A.
==============================================
```

## Build different version of gdb

- Release version

```shell
    ./build.sh release
```

- Version for SW8A

```shell
    ./build.sh 8A
```

## Install directory

Default install directory is ../install, e.g.:

    ../install/bin/
    ├── gcore
    ├── gdb
    ├── gdb-add-index
    └── gdbserver

Next, add path of gdb binaries, then you can run gdb from anywhere:

```shell
    export PATH=/path/to/gdb/install/bin:$PATH
```
