aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf/dwarf2enums.h
Commit message (Collapse)AuthorAgeFilesLines
* Add support for dwarf5 line tables.Sterling Augustine2020-07-141-0/+8
| | | | | | Change-Id: I2c0cd0e7163502e52fbf0745b611befb2e219071 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2276193 Reviewed-by: Sterling Augustine <saugustine@google.com>
* Read dwarf5 compilation unit headers.Sterling Augustine2020-06-251-0/+10
| | | | | | | Change-Id: Ia85b2fb7b3cb821ad353a0003223d8b8465e792d Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2265259 Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
* Add and handle various dwarf5 addrx forms.Sterling Augustine2020-06-241-0/+6
| | | | | | | | | | | | | Given the almost nonexistent direct dwarfreader tests, I think the best way to test these dwarf5 additions will be to add a full dwarf5 compilation unit similar to the ones used incidentally in the other tests. But I can't do that until enough dwarf5 is correctly implemented. Change-Id: I3418bda7212ae85c4b67232a2ab8fea9b9ca5d42 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2258838 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Add and handle new dwarf5 string-related forms.Sterling Augustine2020-06-221-0/+14
| | | | | | | | | | | | | | | | Adding the new forms by type and processing should avoid the problems with 0c0e24f709288a129d665ec27d6f089189318385, where new forms weren't handled in switch statements, breaking the build. Testing this should follow the testing for DW_FORM_GNU_str_index, very closely, but there doesn't appear to be any tests for that, or even DW_FORM_strp. Change-Id: I609d56b1dc879971bfef1070f063f8457fec6017 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2233839 Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
* Revert "Add new dwarf 5 enums, plus some dwarf4 enums."Mike Frysinger2020-03-101-221/+0
| | | | | | | | | | | | This reverts commit 0c0e24f709288a129d665ec27d6f089189318385. Reason for revert: This is causing breakage on CrOS due to unhandled enums and dwarf5 support is in limbo, so pull this back out for now. Bug: google-breakpad:812 Change-Id: I22dd5d87efb8bc83596d51d15a6808c41afb3fd2 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2095872 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Revert "Add dwarf5 compilation-unit header handling."Mike Frysinger2020-03-101-1/+1
| | | | | | | | | | | | This reverts commit dbd454dbe47e584571388fc3533193416bdce67f. Reason for revert: The parent CL is causing breakage on CrOS due to unhandled enums. Before we can revert that, we need to revert this. Bug: google-breakpad:812 Change-Id: I7c2446f3cd8ed9f6411e90dbdd2434bc463b2f6c Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2095798 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Add dwarf5 compilation-unit header handling.Sterling Augustine2019-12-191-1/+1
| | | | | | | | Fix a small typo in DW_LANG__Python. Change-Id: I1fe54e501a5e8da5057ecc9ac00c7e7259a9bb3f Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1967975 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Add new dwarf 5 enums, plus some dwarf4 enums.Sterling Augustine2019-12-121-0/+221
| | | | | | Change-Id: Ibe0b529664dd48a423cb453b786d08c5b7abec19 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1965462 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Don't demangle Rust symbols by default, but allow linking to rust-demangle.Ted Mielczarek2016-10-251-0/+1
| | | | | | | | | | | | | | | | | The Rust compiler uses GCC C++ name mangling, but it has another layer of encoding so abi::cxa_demangle doesn't produce great results. This patch changes dump_syms to dump unmangled names by default so that consumers can demangle them after-the-fact. It also adds a tiny bit of support for linking against a Rust library I wrote that can demangle Rust symbols nicely: https://github.com/luser/rust-demangle-capi BUG= Change-Id: I63a425035ebb7ac516f067fed2aa782849ea9604 Reviewed-on: https://chromium-review.googlesource.com/402308 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Initial support for dumping DWARF corresponding to Swift codeMark Mentovai2016-09-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The DWARF data for Swift code has a top-level DW_TAG_module DIE as the child of the DW_TAG_compile_unit DIE and the parent of the DW_TAG_subprogram DIEs that dump_syms uses to locate functions. dump_syms needs to process DW_TAG_module DIEs as introducing nested scopes to make it work with Swift. This also reworks demangling to be language-specific, so that the C++ demangler isn't invoked when processing Swift code. The DWARF data for Swift code presents its mangled names in the same form as used for C++ (DW_AT_MIPS_linkage_name or DW_AT_linkage_name) but the mangling is Swift-specific (beginning with _T instead of _Z). There is no programmatic interface to a Swift name demangler as an analogue to C++'s __cxa_demangle(), so mangled Swift names are exposed as-is. Xcode's "xcrun swift-demangle" can be used to post-process these mangled Swift names on macOS. Support for mangled names presented in a DW_AT_linkage_name attribute, as used by DWARF 4, is added. This supersedes the earlier use of DW_AT_MIPS_linkage_name. BUG=google-breakpad:702,google-breakpad:715 R=ted.mielczarek@gmail.com Review URL: https://codereview.chromium.org/2147523005 .
* Add debug fission support.Yunlian Jiang2016-05-041-2/+27
| | | | | | | | | | | | | | | | | | | | | This added debug fission support. It tries to find the dwp file from the debug dir /usr/lib/debug/*/debug and read symbols from them. Most of this patch comes from https://critique.corp.google.com/#review/52048295 and some fixes after that. The elf_reader.cc comes from TOT google code. I just removed some google dependency. Current problems from this patch 1: Some type mismatch: from uint8_t * to char *. 2: Some hack to find the .dwp file. (replace .debug with .dwp) BUG=chromium:604440 R=dehao@google.com, ivanpe@chromium.org Review URL: https://codereview.chromium.org/1884283002 .
* Breakpad DWARF: Add support for DWARF 4 attribute forms.jimblandy2012-02-011-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows Breakpad's DWARF reader to at least read or skip attributes using the new forms defined in version 4 of the DWARF specification, instead of crashing. Attributes encoded using DW_FORM_flag_present, DW_FORM_sec_offset, and DW_FORM_exprloc should work fine now. However, compilation units using DW_FORM_ref_sig8 to refer to types in .debug_types will need further work to support. (GCC 4.6.2 does not emit .debug_types sections.) Specifically: - dwarf2reader::DwarfForm gets new values. - dwarf2reader::Dwarf2Handler and dwarf2reader::DIEHandler get new handler methods, named ProcessAttributeSignature, for DW_FORM_ref_sig8 attributes. - dwarf2reader::CompilationUnit reads DW_FORM_ref_sig8 attributes, and passes them to ProcessAttributeSignature. It also gets support for DW_FORM_sec_offset, DW_FORM_exprloc, and DW_FORM_flag_present, using the existing appropriate ProcessAttribute* methods. - dwarf2reader::DIEDispatcher passes through ProcessAttributeSignature attributes to its DIEHandler. - Unit tests are updated. a=jimb, r=ted.mielczarek Review URL: http://breakpad.appspot.com/343003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@912 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a couple of tiny things for GCC pedantryted.mielczarek@gmail.com2010-07-081-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@622 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: Make changes requested by Neal Sidhwaney in issue 59002.jimblandy2010-03-291-0/+31
| | | | | | | | | | - Use manifest constants for 'z' augmentation letters. - Fix typos and rearrange some code for legibility. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@560 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: Parse the .eh_frame section.jimblandy2010-03-161-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | Extend google_breakpad::CFISection with the ability to produce .eh_frame data. Entry headers have a different format, and pointers can be encoded in new and fascinating ways. Extend dwarf2reader::CallFrameInfo to be able to parse either DWARF CFI or .eh_frame data, as determined by an argument to the constructor. Cope with variations in header formats, encoded pointers, and additional data in 'z' augmentation data blocks. Extend the unit tests appropriately. Extend dump_syms to look for a .eh_frame section, and if it is present, find the necessary base addresess and parse its contents. There's no need for DwarfCFIToModule to check the version numbers; if CallFrameInfo can parse it, DwarfCFIToModule should be able to handle it. Adjust tests accordingly. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@552 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad DWARF parser: Add support for parsing .eh_frame encoded pointers.jimblandy2010-03-161-0/+24
| | | | | | | | | | | | The Linux C++ exception handling data format (.eh_frame) can specify a number of different encodings for the addresses it contains. This patch extends dwarf2reader::ByteReader to read pointers encoded in these ways. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@551 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: Add support for dumping DWARF CFI as STACK CFI records.jimblandy2010-03-161-0/+43
| | | | | | | | | | | | | | | | | | | | | | | Define a new DWARF parser class, dwarf2reader::CallFrameInfo. Extend google_breakpad::Module to store and write out 'STACK CFI' records. Define a new google_breakpad::DwarfCFIToModule class, to accept DWARF CFI data from the parser and populate a Module with the equivalent STACK CFI records. Extend the Linux symbol dumping tool, dump_syms, to use dwarf2reader::CallFrameInfo, google_breakpad::DwarfCFIToModule, and google_breakpad::Module to extract DWARF CFI from the executable or shared library files and write it to the Breakpad symbol file. Define CFISection, a new class derived from TestAssembler::Section, for use in creating DWARF CFI data for test cases. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@550 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux DWARF reader: Follow DW_AT_abstract_origin links to find function names.jimblandy2010-02-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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 DWARF Reader: Add DWARF language enumeration values.jimblandy2010-01-111-0/+36
| | | | | | | a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@479 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 39002: Breakpad DWARF parser: Move DWARF parser to ↵jimblandy@gmail.com2009-12-151-0/+490
platform-independent directory. Move the DWARF parser, and the functioninfo.cc DWARF consumer, from src/common/mac/dwarf to src/commmon/dwarf, so that it can be shared between the Mac and Linux dumpers. Fix up #include directives, multiple inclusion protection macros, and Xcode build files. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@446 4c0a9323-5329-0410-9bdc-e9ce6186880e