000517.1 | B | A | D. Anderson | Editorial | .debug_pubnames definition |
Existing wording, section 6.1.1 Lookup By Name, page 49:
"The table consistes of sets of variable length entries,
each set describing the names of global objects whose definitions
or declarations are represented by debugging information entries
owned by a single compilation unit."
===============
Motivation for change:
The above seems simply wrong.
In so far as 'objects' is meant in the C sense of objects, it
means data. Whereas pubnames was intended for all
global things: objects and functions.
Including C++ member functions. Not including C static functions
as C static functions are not global names.
In addition, the reference to declarations is misleading.
If a declaration is not also a definition, there is no reason
to have it in pubnames. Pubnames is intended to help find, quickly,
the definition(s) of data objects and functions.
I cannot understand why finding declarations would be
valuable to a debugger (at least
in the specific sense of accelerated access being
valuable). Comments anyone?
==================
Proposed wording to replace the original sentence:
"The table consistes of sets of variable length entries,
each set describing the names of global objects
and functions whose definitions
are represented by debugging information entries
owned by a single compilation unit."
In italics, in a paragraph following the end of the paragraph
containing the above, add:
C++ member functions with a definition in the class
declaration are definitions in every compilation unit
containing the class declaration, but if there is no
concrete instantiation there is no reason to
have a .debug_pubnames entry for the member function.
At least I cannot think why a pubnames entry would be of value for
such a member function with no concrete version.