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 <allan@archlinux.org>
This commit is contained in:
Allan McRae 2025-01-08 20:13:30 +10:00
parent 680169fb61
commit faea473550

View file

@ -89,6 +89,11 @@ collect_debug_symbols() {
return return
fi 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 # copy source files to debug directory
package_source_files "$binary" package_source_files "$binary"