From 0aef35466f19eb9f3c59533af45ee8eee76a4453 Mon Sep 17 00:00:00 2001 From: Guy Shimko Date: Sun, 9 Feb 2025 23:11:01 +0200 Subject: [PATCH 1/2] Fix gdb debug script auto-load via explicit data&debug configuration The problem was that our default gdb datadir and debugdir had non-standard paths, due to some unknown configuration detection. In order to fix it, we now pass the standard paths via the --with-gdb-datadir & --with-separate-debug-dir variables. I also set --with-jit-reader-dir, --with-system-gdbinit and --with-system-gdbinit-dir path to be the standard path as well. --- src/compilation/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compilation/build.sh b/src/compilation/build.sh index 41136f2..5bda4f7 100755 --- a/src/compilation/build.sh +++ b/src/compilation/build.sh @@ -442,6 +442,9 @@ function build_gdb() { ../configure -C --enable-static --with-static-standard-libraries --disable-inprocess-agent \ --enable-tui "$python_flag" \ --with-expat --with-libexpat-type="static" \ + --with-gdb-datadir="/usr/share/gdb" --with-separate-debug-dir="/usr/lib/debug" \ + --with-system-gdbinit="/etc/gdb/gdbinit" --with-system-gdbinit-dir="/etc/gdb/gdbinit.d" \ + --with-jit-reader-dir="/usr/lib/gdb" \ "--with-libiconv-prefix=$libiconv_prefix" --with-libiconv-type=static \ "--with-gmp=$libgmp_prefix" \ "--with-mpfr=$libmpfr_prefix" \ From fb1c8c064b52e260c592426b5f52d8c9b29cb3f2 Mon Sep 17 00:00:00 2001 From: Guy Shimko Date: Sun, 9 Feb 2025 23:59:12 +0200 Subject: [PATCH 2/2] Updated README and compilation to gdb-16 --- README.md | 2 +- compilation.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d27225d..4579082 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ contributors
- gdb + gdb python diff --git a/compilation.md b/compilation.md index 19441a5..6a39dc2 100644 --- a/compilation.md +++ b/compilation.md @@ -1,7 +1,7 @@ # Notes about this file - read before proceeding! -While we have already provided the gdb/gdbserver-15 statically compiled binaries for you, some people might want to compile it without our build scripts, or compile a newer version of gdb in the future :). -This rest of the file contains a documentation of the compilation process, in order to help you out. +While we have already provided the gdb/gdbserver statically compiled binaries for you, some people might want to compile it without our build scripts, or compile a newer version of gdb in the future :). +The rest of the file contains a documentation of the compilation process, in order to help you out. NOTE: The compilation guide describes the compilation process in order to create a minimal-working version of gdb. Our build-scripts also provides further capabilites to gdb, such as python and xml support, which are not documented in this file. @@ -20,7 +20,7 @@ Examples to the throughout the script: - - /home/username/projects/libgmp-x.y.z/build-arm/ Environment info: -- glibc version: 2.39-0ubuntu8.3 (NOTE: When i compiled gdb-15 using an older glibc, such as the one i had in my ubuntu-20.04 machine, i received a segfault in gdb, so the libc version is important!). +- glibc version: 2.39-0ubuntu8.3 (NOTE: When i compiled gdb using an older glibc, such as the one i had in my ubuntu-20.04 machine, i received a segfault in gdb, so the libc version is important!). # Compiling gdb statically to the host platform