aboutsummaryrefslogtreecommitdiff
path: root/include/opcode/spu.h
diff options
context:
space:
mode:
authorAaron Merey <amerey@redhat.com>2024-03-19 16:41:48 -0400
committerAaron Merey <amerey@redhat.com>2024-03-19 20:43:12 -0400
commitaf1c8a8d9a60869572921f4d2ef3fdcad4843756 (patch)
treee17e25d0a7c261b2194212a005e33170a0377555 /include/opcode/spu.h
parent0f5116cb492cca755c55ad30ea06be4e7c72a27f (diff)
downloadfsf-binutils-gdb-af1c8a8d9a60869572921f4d2ef3fdcad4843756.zip
fsf-binutils-gdb-af1c8a8d9a60869572921f4d2ef3fdcad4843756.tar.gz
fsf-binutils-gdb-af1c8a8d9a60869572921f4d2ef3fdcad4843756.tar.bz2
gdb/debuginfod: Support on-demand debuginfo downloading
At the beginning of a session, gdb may attempt to download debuginfo for all shared libraries associated with the process or core file being debugged. This can be a waste of time and storage space when much of the debuginfo ends up not being used during the session. To reduce the gdb's startup latency and to download only the debuginfo that is really needed, this patch adds on-demand downloading of debuginfo. 'set debuginfo enabled on' now causes gdb to attempt to download a .gdb_index for each shared library instead of its full debuginfo. Each corresponding separate debuginfo will be deferred until gdb needs to expand symtabs associated with the debuginfo's index. Because these indices are significantly smaller than their corresponding debuginfo, this generally reduces the total amount of data gdb downloads. Reductions of 80%-95% have been observed when debugging large GUI programs. (gdb) set debuginfod enabled on (gdb) start Downloading section .gdb_index for /lib64/libcurl.so.4 [...] 1826 client->server_mhandle = curl_multi_init (); (gdb) step Downloading separate debug info for /lib64/libcurl.so.4 Downloading separate debug info for [libcurl dwz] Downloading source file /usr/src/debug/curl-7.85.0-6.fc37.x86_64/build-full/lib/../../lib/multi.c curl_multi_init () at ../../lib/multi.c:457 457 { (gdb) Some of the key functions below include dwarf2_has_separate_index which downloads the separate .gdb_index. If successful, the shared library objfile owns the index until the separate debug objfile is downloaded or confirmed to not be available. read_full_dwarf_from_debuginfod downloads the full debuginfo and initializes the separate debug objfile. It is called by functions such as dwarf2_gdb_index::expand_symtabs_matching and dwarf2_base_index_functions::find_pc_sect_compunit_symtab when symtab expansion is required.
Diffstat (limited to 'include/opcode/spu.h')
0 files changed, 0 insertions, 0 deletions