|
1 | | -# Repository of static gdb and gdbserver |
| 1 | +<h1 align="center"> |
| 2 | + <picture> |
| 3 | + <source media="(prefers-color-scheme: dark)" srcset="./.github/assets/gdb-static_logo_dark.svg"> |
| 4 | + <source media="(prefers-color-scheme: light)" srcset="./.github/assets/gdb-static_logo_light.svg"> |
| 5 | + <img src="./.github/assets/gdb-static_logo_light.svg" alt="gdb-static" width="210px"> |
| 6 | + </picture> |
| 7 | +</h1> |
2 | 8 |
|
3 | | -## **The statically compiled gdb / gdbserver binaries are avaliable to download under github releases!** |
| 9 | +<p align="center"> |
| 10 | + <i align="center">Frozen static builds of everyone's favorite debugger!🧊</i> |
| 11 | +</p> |
4 | 12 |
|
5 | | -link: [gdb-static github releases](https://github.com/guyush1/gdb-static/releases) |
| 13 | +<h4 align="center"> |
| 14 | + <a href="https://github.com/guyush1/gdb-static/releases/latest"> |
| 15 | + <img src="https://img.shields.io/github/v/release/guyush1/gdb-static?style=flat-square" alt="release" style="height: 20px;"> |
| 16 | + <a href="https://github.com/guyush1/gdb-static/actions/workflows/pr-pipeline.yaml"> |
| 17 | + <img src="https://img.shields.io/github/actions/workflow/status/guyush1/gdb-static/pr-pipeline.yaml?style=flat-square&label=pipeline" alt="continuous integration" style="height: 20px;"> |
| 18 | + </a> |
| 19 | + <a href="https://github.com/guyush1/gdb-static/graphs/contributors"> |
| 20 | + <img src="https://img.shields.io/github/contributors-anon/guyush1/gdb-static?color=yellow&style=flat-square" alt="contributors" style="height: 20px;"> |
| 21 | + </a> |
| 22 | + <br> |
| 23 | + <img src="https://img.shields.io/badge/GDB-v15.2-orange?logo=gnu&logoColor=white&style=flat-square" alt="gdb" style="height: 20px;"> |
| 24 | + <img src="https://img.shields.io/badge/Python-built--in-blue?logo=python&logoColor=white&style=flat-square" alt="python" style="height: 20px;"> |
| 25 | +</h4> |
6 | 26 |
|
7 | | -## For manual gdb/gdbserver compilation instructions, have a look at the compilation.md file |
| 27 | +## TL;DR |
8 | 28 |
|
9 | | -## Compiling gdb using docker |
| 29 | +- **Download**: Get the latest release from the [releases page](https://github.com/guyush1/gdb-static/releases/latest). |
10 | 30 |
|
11 | | -This repository contains a dockerfile and build scripts to compile gdb and gdbserver statically for multiple architectures. |
12 | | -Currently, the supported architectures are: |
13 | | -- x86_64 |
14 | | -- arm |
15 | | -- aarch64 |
16 | | -- powerpc (32bit) |
17 | | -You can easily expand it to support more architectures by adding the appropriate cross compilers to the dockerfile, and other build scripts. |
| 31 | +## Introduction |
18 | 32 |
|
19 | | -NOTE: You don't need to interact with the dockerfile directly, as the Makefile will take care of everything for you. |
| 33 | +Who doesn't love GDB? It's such a powerful tool, with such a great package. |
| 34 | +But sometimes, you run into one of these problems: |
| 35 | +- You can't install GDB on your machine |
| 36 | +- You can't install an updated version of GDB on your machine |
| 37 | +- Some other strange embedded reasons... |
20 | 38 |
|
21 | | -### Building for a specific architecture |
| 39 | +This is where `gdb-static` comes in! We provide static builds of `gdb` (and `gdbserver` of course), so you can run them on any machine, without any dependencies! |
22 | 40 |
|
23 | | -To build for a specific architecture, you can use the following command: |
24 | | -```bash |
25 | | -make build-<ARCH> |
26 | | -``` |
| 41 | +<details open> |
| 42 | +<summary> |
| 43 | + Features |
| 44 | +</summary> <br /> |
| 45 | + |
| 46 | +- **Static Builds**: No dependencies, no installation, just download and run! |
| 47 | +- **Latest Versions**: We keep our builds up-to-date with the latest versions of GDB. |
| 48 | +- **Builtin Python (Optional)**: We provide builds with Python support built-in. |
| 49 | +- **XML Support**: Our builds come with XML support built-in, which is useful for some GDB commands. |
| 50 | +- **Wide Architecture Support**: We support a wide range of architectures: |
| 51 | + - aarch64 |
| 52 | + - arm |
| 53 | + - mips |
| 54 | + - mipsel |
| 55 | + - powerpc |
| 56 | + - x86_64 |
| 57 | + |
| 58 | +</details> |
| 59 | + |
| 60 | +## Usage |
| 61 | + |
| 62 | +To get started with `gdb-static`, simply download the build for your architecture from the [releases page](https://github.com/guyush1/gdb-static/releases/latest), extract the archive, and copy the binary to your desired platform. |
| 63 | + |
| 64 | +> [!NOTE] |
| 65 | +> We provide two types of builds: |
| 66 | +> 1. Builds with Python support, which are approximately ~30 MB in size. |
| 67 | +> 2. Slimmer builds without Python support, which are approximately ~7 MB in size. |
| 68 | +
|
| 69 | +You may choose to copy the `gdb` binary to the platform, or use `gdbserver` to debug remotely. |
| 70 | + |
| 71 | +## Development |
| 72 | + |
| 73 | +Alternatively, you can build `gdb-static` from source. To do so, follow the instructions below: |
| 74 | + |
| 75 | +<details open> |
| 76 | +<summary> |
| 77 | +Pre-requisites |
| 78 | +</summary> <br /> |
| 79 | +To be able to build `gdb-static`, you will need the following tools installed on your machine: |
| 80 | + |
| 81 | +### |
| 82 | + |
| 83 | +- Docker |
| 84 | +- Docker buildx |
| 85 | +- Git |
| 86 | +</details> |
| 87 | + |
| 88 | +<details open> |
| 89 | +<summary> |
| 90 | +Building for a specific architecture |
| 91 | +</summary> <br /> |
| 92 | + |
| 93 | +To build `gdb-static` for a specific architecture, run the following command: |
27 | 94 |
|
28 | | -For example, to build for arm: |
29 | 95 | ```bash |
30 | | -make build-arm |
| 96 | +make build[-with-python]-<ARCH> |
31 | 97 | ``` |
32 | 98 |
|
33 | | -The resulting binaries will be placed under the `build/artifacts/` directory. |
34 | | -Each architecture will have its own directory under `build/artifacts/`. For example, the arm architecture will have the following directory structure: |
35 | | -``` |
| 99 | +Where `<ARCH>` is the architecture you want to build for, and `-with-python` may be added in order to compile gdb with Python support. |
| 100 | + |
| 101 | +The resulting binary will be placed in the `build/artifacts/` directory: |
| 102 | + |
| 103 | +```bash |
36 | 104 | build/ |
37 | | - artifacts/ |
38 | | - arm/ |
39 | | - ... |
| 105 | +└── artifacts/ |
| 106 | + └── <ARCH>/ |
| 107 | + └── ... |
40 | 108 | ``` |
41 | 109 |
|
42 | | -### Building for all architectures |
| 110 | +</details> |
| 111 | + |
| 112 | +<details open> |
| 113 | +<summary> |
| 114 | +Building for all architectures |
| 115 | +</summary> <br /> |
| 116 | + |
| 117 | +To build `gdb-static` for all supported architectures, run the following command: |
43 | 118 |
|
44 | | -To build for all architectures, you can use the following command: |
45 | 119 | ```bash |
46 | 120 | make build |
47 | 121 | ``` |
48 | 122 |
|
49 | | -### Cleaning the build |
| 123 | +The resulting binary will be placed in the `build/artifacts/` directory. |
50 | 124 |
|
51 | | -To clean the build, you can use the following command: |
52 | | -```bash |
53 | | -make clean |
54 | | -``` |
| 125 | +</details> |
| 126 | + |
| 127 | +<a name="contributing_anchor"></a> |
| 128 | +## Contributing |
| 129 | + |
| 130 | +- Bug Report: If you see an error message or encounter an issue while using gdb-static, please create a [bug report](https://github.com/guyush1/gdb-static/issues/new?assignees=&labels=bug&title=%F0%9F%90%9B+Bug+Report%3A+). |
| 131 | + |
| 132 | +- Feature Request: If you have an idea or if there is a capability that is missing and would make `gdb-static` more robust, please submit a [feature request](https://github.com/guyush1/gdb-static/issues/new?assignees=&labels=enhancement&title=%F0%9F%9A%80+Feature+Request%3A+). |
| 133 | + |
| 134 | +## Contributors |
| 135 | + |
| 136 | +<!--- |
| 137 | +npx contributor-faces --exclude "*bot*" --limit 70 --repo "https://github.com/guyush1/gdb-static" |
| 138 | +
|
| 139 | +change the height and width for each of the contributors from 80 to 50. |
| 140 | +---> |
| 141 | + |
| 142 | +[//]: contributor-faces |
| 143 | +<a href="https://github.com/guyush1"><img src="https://avatars.githubusercontent.com/u/82650790?v=4" title="guyush1" width="80" height="80"></a> |
| 144 | +<a href="https://github.com/RoiKlevansky"><img src="https://avatars.githubusercontent.com/u/78471889?v=4" title="RoiKlevansky" width="80" height="80"></a> |
| 145 | +<a href="https://github.com/roddyrap"><img src="https://avatars.githubusercontent.com/u/37045659?v=4" title="roddyrap" width="80" height="80"></a> |
| 146 | + |
| 147 | +[//]: contributor-faces |
0 commit comments