Skip to content
Vector35Public

About

Reproducible native GDB builds for Binary Ninja

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GDB build

Reproducible native builds of GNU GDB for Linux, macOS, and Windows. The result is a relocatable archive suitable for embedding in another application.

The source version and SHA-256 are pinned in versions.env. Builds deliberately disable Python, Guile, and source-highlight to keep the runtime small. macOS executables are signed before packaging.

Outputs

Each build produces artifacts/gdb_<platform>_<version>.zip. Archives have the same layout on every host:

GDB/
  COPYING
  bin/gdb[.exe]
  lib/                 # non-system runtime libraries, when needed
  share/gdb/

Supported platform names are linux, linux-arm, macosx, and win64. The macOS archive contains a universal ARM64/x86_64 executable with statically linked GMP and MPFR. Building it requires an Apple Silicon worker with Rosetta. The ARM64 slice is remote-only: upstream GDB lacks a Darwin ARM64 native backend. The x86_64 slice retains Darwin native support. Both support all remote targets. The version-scoped patch in patches/ adds the missing declaration include required to compile GDB 17.2's Darwin native source.

Local builds

Linux and macOS:

./scripts/build-posix.sh linux    # or linux-arm / macosx

The POSIX build expects a C/C++ toolchain, GNU make, Python 3, xz, and the GDB development dependencies. Linux requires the static Expat and terminal archives (on Debian or Ubuntu, install libexpat1-dev and libncurses-dev). Linux links non-system dependencies statically and still uses system glibc. macOS requires the Xcode command-line tools.

Windows builds run in MSYS2's MINGW64 environment. Dependency installation uses https://repo.msys2.org directly, without geo-redirectors or third-party mirrors. The build uses a workspace-local pacman configuration and preserves package signature verification; it does not change a shared MSYS2 installation's settings.

./scripts/build-windows.ps1

The PowerShell entry point locates an existing MSYS2 installation or bootstraps a pinned, SHA-256-verified portable MSYS2 environment in the workspace. It then installs the required MinGW packages with pacman and invokes the shared build logic. It does not require or perform code signing.

Jenkins

macOS builds link GMP and MPFR statically. Packaging signs the executable before creating the archives. GDB_CODESIGN_IDENTITY selects the signing identity (default: Developer ID); the worker must already have access to that identity. Consumers must copy it unchanged, without modifying load commands or signing it again. XML and other auxiliary files remain unsigned resources.

The executable supports both the archive's bin/gdb layout and an app's Contents/MacOS/plugins/gdb layout. For the latter, place share/gdb/ under Contents/Resources/gdb/ and launch with --data-directory pointing to that directory.

Jenkinsfile defines a parameterized matrix build. Configure a Pipeline from SCM pointing at this repository and leave the script path as Jenkinsfile. The job only checks out this public repository, builds on the selected native workers, verifies the resulting executable with --version and a short MI2 smoke test, and archives the platform zip.

GDB itself is licensed under GPLv3; each archive includes GDB's COPYING file. The build orchestration in this repository is MIT licensed.

About

Reproducible native GDB builds for Binary Ninja

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages