Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Add a comment briefly explaining partial symbols
@ 2019-07-31 22:12 Christian Biesinger via gdb-patches
  2019-07-31 23:59 ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-07-31 22:12 UTC (permalink / raw)
  To: gdb-patches; +Cc: Christian Biesinger

Based on an explanation by tromey on IRC.

gdb/ChangeLog:

2019-07-31  Christian Biesinger  <cbiesinger@google.com>

	* objfiles.h (objfile): Add a comment describing partial symbols.
---
 gdb/objfiles.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index a0c106be3d..c7e0be1955 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.22.0.709.g102302147b-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-05 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 22:12 [PATCH] Add a comment briefly explaining partial symbols Christian Biesinger via gdb-patches
2019-07-31 23:59 ` Simon Marchi
2019-08-05 15:37   ` Christian Biesinger via gdb-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox