aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/dwarf_line_to_module_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Breakpad symbol dumper: Move Linux dumping classes into src/common.jimblandy2010-04-051-339/+0
| | | | | | | | | | | The Linux symbol dumper's classes are reasonably portable, and should be usable for the Mac dumper as well. Move them to src/common, along with their unit tests. Update #include directives and Makefile. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@567 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux symbol dumper: Handle programs linked with --gc-sections.jimblandy2010-02-241-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As explained in the code: Given the right options, the GNU toolchain will omit unreferenced functions from the final executable. Unfortunately, when it does so, it does not remove the associated portions of the line number program; instead, it lets the symbol references in the DW_LNE_set_address instructions pointing to the now-deleted code resolve to zero. Given this input, the DWARF line parser will call AddLine with a series of lines starting at address zero. Rather than collecting series of lines describing code that is not there, we should drop them. Since the linker doesn't explicitly distinguish references to dropped sections from genuine references to zero, we must use a heuristic. We have chosen: - If a line starts at address zero, omit it. (On the platforms breakpad targets, it is extremely unlikely that there will be code at address zero.) - If a line starts immediately after an omitted line, omit it too. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@538 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-44/+44
| | | | | | | | | | | | | 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/+265
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