aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/dwarf_cu_to_module.cc
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-02-09 17:10:57 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-02-09 17:10:57 +0000
commitc50e7c604cd1b12bba9421b0a95357fc942ecd7c (patch)
tree04bb8865b5b3a065d69b843cf904027b5d3c19b7 /src/common/linux/dwarf_cu_to_module.cc
parentBreakpad: Update copyright notice years on all files changed in 2010. (diff)
downloadbreakpad-c50e7c604cd1b12bba9421b0a95357fc942ecd7c.tar.xz
Breakpad Linux dumper: Add file comments as required by the style guide.
This also includes some comments I promised Cary Coutant I'd write about the appropriateness of processing attributes in EndAttributes calls. The Google C++ Style Guide requires each file to have an author notice and a comment explaining the file's general purpose. For the record, I don't think putting an author notice on the files is a good idea; it's odd to have the original author retain prominence even if the file has been heavily edited by others; the version control system answers this question more accurately. This is only for Style Guide compliance. The Apache group decided to discourage author annotations, partially for these reasons: http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-dev/200402.mbox/%3C4039F65E.7020406@atg.com%3E a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@518 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux/dwarf_cu_to_module.cc')
-rw-r--r--src/common/linux/dwarf_cu_to_module.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/linux/dwarf_cu_to_module.cc b/src/common/linux/dwarf_cu_to_module.cc
index 5b9c33f8..3c339870 100644
--- a/src/common/linux/dwarf_cu_to_module.cc
+++ b/src/common/linux/dwarf_cu_to_module.cc
@@ -27,6 +27,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Original author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
+
+// Implement the DwarfCUToModule class; see dwarf_cu_to_module.h.
+
#include <algorithm>
#include <cassert>
@@ -168,6 +172,10 @@ class DwarfCUToModule::GenericDIEHandler: public dwarf2reader::DIEHandler {
// DIE is a declaration DIE, to be cited by other DIEs'
// DW_AT_specification attributes, record its enclosing name and
// unqualified name in the specification table.
+ //
+ // Use this from EndAttributes member functions, not ProcessAttribute*
+ // functions; only the former can be sure that all the DIE's attributes
+ // have been seen.
string ComputeQualifiedName();
CUContext *cu_context_;
@@ -204,6 +212,11 @@ void DwarfCUToModule::GenericDIEHandler::ProcessAttributeReference(
uint64 data) {
switch (attr) {
case dwarf2reader::DW_AT_specification: {
+ // Find the Specification to which this attribute refers, and
+ // set specification_ appropriately. We could do more processing
+ // here, but it's better to leave the real work to our
+ // EndAttribute member function, at which point we know we have
+ // seen all the DIE's attributes.
FileContext *file_context = cu_context_->file_context;
SpecificationByOffset *specifications
= &file_context->file_private->specifications;