aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/dwarf_cu_to_module_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Breakpad Linux Dumper: Disable warnings about unpaired functions and lines ↵jimblandy2010-04-051-0/+64
| | | | | | | | | | | | | | | | | | | by default. In the process of pairing up DWARF source lines with the functions they belong to, the dumper detects and warns about regions of functions that have no source line information, and vice versa. However, this seems to occur in real code frequently enough (although not often) that the warnings may obscure more serious problems. This patch makes those warnings disabled by default in DwarfCUToModule::WarningReporter. It does not add a way for the dump_syms user to enable them. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@566 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: Record AbstractOrigin entries for all DIEs that need ↵jimblandy2010-02-201-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | them. Any DIE with an DW_AT_inline attribute can be cited by DW_AT_abstract_origin attributes --- even if the value of the DW_AT_inline attribute is DW_INL_not_inlined. Thus, we need to set the inline_ flag on all such DIEs, regardless of the attribute's value. This allows us to find names in situations like this: <1><30cf>: Abbrev Number: 57 (DW_TAG_subprogram) <30d0> DW_AT_specification: <0x3013> <30d4> DW_AT_decl_file : 1 <30d5> DW_AT_decl_line : 92 <30d6> DW_AT_inline : 0 (not inlined) <30d7> DW_AT_sibling : <0x30f0> ... <1><30f5>: Abbrev Number: 59 (DW_TAG_subprogram) <30f6> DW_AT_abstract_origin: <0x30cf> <30fa> DW_AT_low_pc : 0x13bc <30fe> DW_AT_high_pc : 0x13ec <3102> DW_AT_frame_base : 0x2c (location list) <3106> DW_AT_sibling : <0x3113> a=jimblandy, r=nealsid,dmuir git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@526 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux DWARF reader: Follow DW_AT_abstract_origin links to find function names.jimblandy2010-02-101-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch, debugging information like the following will produce FUNC records with no names, because the dumper (correctly) ignores the DW_TAG_subprogram DIEs that lack DW_AT_low_pc/DW_AT_high_pc attributes, but won't follow the DW_AT_abstract_origin link from the DIE that does have code addresses to find its name. <1><168>: Abbrev Number: 5 (DW_TAG_class_type) <169> DW_AT_name : Foo <2><183>: Abbrev Number: 7 (DW_TAG_subprogram) <185> DW_AT_name : Foo <18b> DW_AT_declaration : 1 <1><1b7>: Abbrev Number: 12 (DW_TAG_subprogram) <1b8> DW_AT_specification: <0x183> <1bc> DW_AT_inline : 2 (declared as inline but ignored) <1><1dc>: Abbrev Number: 16 (DW_TAG_subprogram) <1dd> DW_AT_abstract_origin: <0x1b7> <1e1> DW_AT_low_pc : 0x8048578 <1e5> DW_AT_high_pc : 0x8048588 a=dmuir, r=jimblandy git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@520 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: Add file comments as required by the style guide.jimblandy2010-02-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* Breakpad: Update copyright notice years on all files changed in 2010.jimblandy2010-02-091-1/+1
| | | | | | | | | | We've gotten mixed advice from the lawyery types about whether this matters. But it's easy enough to do. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@517 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux Dumper: Rename structure members to follow the Google C++ ↵jimblandy2010-01-281-16/+16
| | | | | | | | | | | | | Style Guide. The Google C++ Style Guide says that members of structures needn't have names ending in underscores. The structure types in google_breakpad::Module don't follow this rule. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@505 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux Dumper: Add DWARF support.jimblandy2010-01-231-0/+1456
This adds DWARF support to the Breakpad Linux dumper. This is implemented as two handler classes: google_breakpad::DwarfCUToModule accepts data from dwarf2reader::CompilationUnit, and google_breakpad::DwarfLineToModule accepts data from a dwarf2reader::LineInfo, each populating a google_breakpad::Module with the results. Behaviors specific to particular source languages are handled by instances of a new class, google_breakpad::Language. An input executable may contain both STABS and DWARF debugging information: the dumper automatically recognizes what sorts of information are available, and integrates the data into a single output file. All classes have unit tests, providing line and branch coverage of all interesting code. Unit tests are written using the Google C++ Testing Framework, and the Google C++ Mocking Framework where appropriate. a=jimblandy, r=ccoutant git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@497 4c0a9323-5329-0410-9bdc-e9ce6186880e