aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorMatheus Branco Borella <dark.ryu.550@gmail.com>2023-10-10 10:26:40 +0200
committerTom de Vries <tdevries@suse.de>2023-10-10 10:26:40 +0200
commit8b9c08eddac038663b8f5ede4b4d24e441a6d8a3 (patch)
tree828d9bed8c1ee0e66bec726788ce2c3fab520063 /gdb/NEWS
parentd883c61283a547788292f94633799303fd34080c (diff)
downloadgdb-8b9c08eddac038663b8f5ede4b4d24e441a6d8a3.zip
gdb-8b9c08eddac038663b8f5ede4b4d24e441a6d8a3.tar.gz
gdb-8b9c08eddac038663b8f5ede4b4d24e441a6d8a3.tar.bz2
[gdb/symtab] Add name_of_main and language_of_main to the DWARF index
This patch adds a new section to the DWARF index containing the name and the language of the main function symbol, gathered from `cooked_index::get_main`, if available. Currently, for lack of a better name, this section is called the "shortcut table". The way this name is both saved and applied upon an index being loaded in mirrors how it is done in `cooked_index_functions`, more specifically, the full name of the main function symbol is saved and `set_objfile_main_name` is used to apply it after it is loaded. The main use case for this patch is in improving startup times when dealing with large binaries. Currently, when an index is used, GDB has to expand symtabs until it finds out what the language of the main function symbol is. For some large executables, this may take a considerable amount of time to complete, slowing down startup. This patch bypasses that operation by having both the name and language of the main function symbol be provided ahead of time by the index. In my testing (a binary with about 1.8GB worth of DWARF data) this change brings startup time down from about 34 seconds to about 1.5 seconds. When testing the patch with target board cc-with-gdb-index, test-case gdb.fortran/nested-funcs-2.exp starts failing, but this is due to a pre-existing issue, filed as PR symtab/30946. Tested on x86_64-linux, with target board unix and cc-with-gdb-index. PR symtab/24549 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24549 Approved-By: Tom de Vries <tdevries@suse.de>
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index d8c83be..0f75abe 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,9 @@
*** Changes since GDB 14
+* GDB index now contains information about the main function. This speeds up
+ startup when it is being used for some large binaries.
+
*** Changes in GDB 14
* GDB now supports the AArch64 Scalable Matrix Extension 2 (SME2), which