aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf/dwarf2reader_cfi_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* fix pointer style to match the style guideMike Frysinger2020-07-151-26/+26
| | | | | | | | | | We do this in a lot of places, but we're inconsistent. Normalize the code to the Google C++ style guide. Change-Id: Ic2aceab661ce8f6b993dda21b1cdf5d2198dcbbf Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2262932 Reviewed-by: Sterling Augustine <saugustine@google.com> Reviewed-by: Mark Mentovai <mark@chromium.org>
* Use stdint.h numeric types in testsJoshua Peraza2020-04-161-14/+16
| | | | | | Change-Id: Iaa79c5c7c70ca953256cd39cc9f6f4f139c696af Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2153567 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use stdint.h numeric typesJoshua Peraza2020-04-091-14/+14
| | | | | | Change-Id: Ib815b0757539145c005d828080b92cbfa971a21b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2141226 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Enable reading DWARF4 CIEs with 32 bit addresses.Nelson Billing2019-12-051-6/+33
| | | | | | | | | | | | | - Reading DWARF4 CIEs was added in https://chromium-review.googlesource.com/c/breakpad/breakpad/+/406012 but it was only enabled for 64bit builds, since it would error out if the CIE address size was not 8 bytes. - Added a unit test to ensure that 32bit continues to work. Change-Id: I824bb40cdf12056d39da335adb55ed315970fb88 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1941034 Reviewed-by: Ivan Penkov <ivanpe@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
* Basic handling of CIE version 4 in dwarf readingScott Graham2016-11-021-0/+87
| | | | | | | | | | | | | | | | | CIE looks like it's been emitted by clang since ~May 2015 [1]. This means that we didn't have any CFI because this parse aborted, which meant that all stack walks reverted to stack scanning. Allow expected values for address size and segment descriptor size through so that dump_syms can generate at least somewhat reasonable data. [1]: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150518/277292.html R=mark@chromium.org BUG=chromium:627529 Change-Id: I6dc92f51c4afd25c2adff92c09ccb8bb03bf9112 Reviewed-on: https://chromium-review.googlesource.com/406012 Reviewed-by: Mark Mentovai <mark@chromium.org>
* convert to uint8_t* for binary data to fix -Wnarrowing build errorsMike Frysinger2016-01-261-16/+32
| | | | | | | | | | | | | | | Newer gcc versions default to -Werror=narrowing when using newer C++ standards (which we do). This causes issues when we try to stuff a value like 0xea into a char -- the value is out of range for signed char bytes. That's when gcc throws an error: .../bytereader_unittest.cc: In member function 'virtual void Reader_DW_EH_PE_absptr4_Test::TestBody()': .../bytereader_unittest.cc:400:55: error: narrowing conversion of '234' from 'int' to 'char' inside { } [-Wnarrowing] BUG=chromium:579384 TEST=`make check` passes R=mark@chromium.org Review URL: https://codereview.chromium.org/1605153004 .
* Use stdint types everywhereted.mielczarek@gmail.com2013-03-061-4/+4
| | | | | | R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
* This change allows compiling the google-breakpad code using a global ↵ivan.penkov@gmail.com2012-06-281-1/+1
| | | | | | ::string class instead of std::string. For more details take a look at common/using_std_string.h git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add includes for unittests that appear to need them.jessicag.feedback@gmail.com2011-10-171-0/+2
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@870 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Avoid using the C++ <cfoo> headers.ted.mielczarek2010-06-251-4/+5
| | | | | | | | | | | | This patch avoids unnecessary use of the <cfoo> headers in files that don't actually use the identifiers they declare in the std:: namespace. It also changes some files to better conform with the "Names and Order of Includes" rules in the Google C++ Style Guide. A=jimb R=mark git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@619 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Mac symbol dumper: Add new Mach-O reader class.ted.mielczarek2010-06-251-5/+5
| | | | | | | | | | | | | | | | This patch adds files defining new classes in the google_breakpad::Mach_O namespace for parsing fat binaries and Mach-O files. These are used in the new dumper to handle STABS debugging information, DWARF call frame information, and .eh_frame exception handling stack walking information. These new classes are independent of endianness and word size, and therefore can be used on binaries of all the relevant architectures: x86, x86_64, ppc, and ARM. The patch adds a complete set of unit tests for the new classes. A=jimb R=mark (http://breakpad.appspot.com/93001/show, http://breakpad.appspot.com/115001/show) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@610 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: Make changes requested by Neal Sidhwaney in issue 59002.jimblandy2010-03-291-2/+2
| | | | | | | | | | - 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-4/+525
| | | | | | | | | | | | | | | | | | | | | | | | 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 Linux dumper: Add support for dumping DWARF CFI as STACK CFI records.jimblandy2010-03-161-0/+1928
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