From 4ee94178afbe062bc244d28595f86d63633a7af7 Mon Sep 17 00:00:00 2001 From: Christian Biesinger Date: Wed, 31 Jul 2019 17:10:50 -0500 Subject: [PATCH] Add a comment briefly explaining partial symbols Based on an explanation by tromey on IRC. gdb/ChangeLog: 2019-08-05 Christian Biesinger * objfiles.h (objfile): Add a comment describing partial symbols. --- gdb/ChangeLog | 4 ++++ gdb/objfiles.h | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0d324a56cfb..da1d636a244 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-08-05 Christian Biesinger + + * objfiles.h (objfile): Add a comment describing partial symbols. + 2019-08-05 Tom Tromey * compile/compile.c (_initialize_compile): Use _(), not N_(). diff --git a/gdb/objfiles.h b/gdb/objfiles.h index a0c106be3d4..239aba2c2a1 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -382,7 +382,13 @@ private: 2. Additional symbol files added by the add-symbol-file command, 3. Shared library objfiles, added by ADD_SOLIB, 4. symbol files for modules that were loaded when GDB attached to a remote system - (see remote-vx.c). */ + (see remote-vx.c). + + GDB typically reads symbols twice -- first an initial scan which just + reads "partial symbols"; these are partial information for the + static/global symbols in a symbol file. When later looking up symbols, + objfile->sf->qf->lookup_symbol is used to check if we only have a partial + symbol and if so, read and expand the full compunit. */ struct objfile { -- 2.30.2