From faea4735505c7aae4a06934a8c5f643649438a14 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 8 Jan 2025 20:13:30 +1000 Subject: [PATCH] Add a .gdb_index section before splitting debug info Using gdb-add-index to add a .gdb_index section before splitting debug info (together with enabling "maintenance set debuginfod download-sections" in GDB) can dramatically reduce the amount of data GDB has to download. Fixes #205. Signed-off-by: Allan McRae --- scripts/libmakepkg/tidy/strip.sh.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in index 09e28c04..136fc527 100644 --- a/scripts/libmakepkg/tidy/strip.sh.in +++ b/scripts/libmakepkg/tidy/strip.sh.in @@ -89,6 +89,11 @@ collect_debug_symbols() { return fi + # add GDB index if gdb-add-index is present + if type -p gdb-add-index >/dev/null; then + gdb-add-index "$binary" + fi + # copy source files to debug directory package_source_files "$binary"