aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf_cu_to_module.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Refactor rangelist handling to prepare for dwarf5 .debug_rngslist"HEADmasterSterling Augustine2020-10-021-14/+1
| | | | | | | | | | | | This reverts commit 2b936b06c12657b684f6c7276d6ae5a24cb48ab5. After getting deep into the dwarf5 range reader, I realized that this should be done a somewhat different way. So reverting in favor or a better design, coming in a few minutes. Change-Id: Ie0b2846e70b3df1e637831e96ea69fe093f4e712 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2446011 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Refactor rangelist handling to prepare for dwarf5 .debug_rngslistSterling Augustine2020-09-281-1/+14
| | | | | | | | | | | | | | | | | | | | | | Dwarf5 introduces a new .debug_rngslist section, to take the place of the Dwarf4 .debug_ranges. However, the dwarf version is CU-based, and not file-based, so there can be both sections, and which section the CU needs isn't known until the dwarf parser encounters either DW_AT_ranges (dwarf 4 and lower) or DW_AT_rnglists_base (dwarf 5). This change refactors the code around range lists and range list readers to defer the decision of what section to parse until the relevant attribute is found. It moves the range list section reader from the range-list handler itself (which doesn't know which section it will use) to the CU context, and then lets the handler know when it encounters DW_AT_ranges. I will add a reader for the new dwarf5 section, along with the code to interpret the new section, and its forms and such in a subsequent patch. Change-Id: Ie92e4c9daa3f0acb98d7ef74f6b9c2065db849b1 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2433684 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Check for tombstone as very first entry in the line table.Sterling Augustine2020-07-271-0/+5
| | | | | | | | | | | | This is a folow up to https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2317730 and handles the additional case where there are no entries in the line table at all. Change-Id: I100c5d0891e7dc7088d58da11240d7df3a6c48d9 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2321300 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Properly handle new tombstone values that now appear as a result of the llvm ↵Sterling Augustine2020-07-241-1/+4
| | | | | | | | | change described at https://reviews.llvm.org/D81784. Change-Id: I79dc5a72b651aa057104cd42b4773391df68125b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2317730 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Nelson Billing <nbilling@google.com>
* fix pointer style to match the style guideMike Frysinger2020-07-151-59/+59
| | | | | | | | | | 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>
* Add support for dwarf5 line tables.Sterling Augustine2020-07-141-5/+26
| | | | | | Change-Id: I2c0cd0e7163502e52fbf0745b611befb2e219071 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2276193 Reviewed-by: Sterling Augustine <saugustine@google.com>
* Move GetSectionByName out of CompilationUnit.Sterling Augustine2020-06-261-5/+1
| | | | | | | | | | For the upcoming Dwarf5 LineInfo changes, we will need to get several additional sections by name, but without a the Compilation Unit. This change prepares for that. Change-Id: I566855abb339a856110a2f7d243d3848fe2b3c18 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2268861 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Add and handle various dwarf5 addrx forms.Sterling Augustine2020-06-241-1/+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>
* Use portable format macrosJoshua Peraza2020-04-161-13/+14
| | | | | | | Bug: 1071277 Change-Id: Ic65704a20c55fea83b5633650ee2c769ac227a56 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2153333 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use stdint.h numeric typesJoshua Peraza2020-04-091-45/+45
| | | | | | Change-Id: Ib815b0757539145c005d828080b92cbfa971a21b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2141226 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* dump_syms: Reintroduce warnings inadvertently removed by 47cd498384fdMark Mentovai2020-03-061-14/+24
| | | | | | | | | | | | | | | | | Previously, dump_syms produced warnings whenever a DW_AT_specification or DW_AT_abstract_origin attribute was a forward reference. 47cd498384fd allowed those attributes to carry forward references, removing the warnings altogether. It was not correct to remove the warnings entirely. References that do not point to valid DIEs should still produce warnings, whether a back reference or a forward reference. This reintroduces those warnings as appropriate. Bug: google-breakpad:813 Test: dumper_unittest SimpleCU.UnknownAbstractOrigin,Specifications.BadOffset Change-Id: Ie7222c7a1886bab31423f27e2fbcce93e69625b3 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2090103 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* dump_syms: handle forward reference DWARF attributesMark Mentovai2019-12-021-12/+34
| | | | | | | | | | | | | | | | | | | | | | | DW_AT_specification and DW_AT_abstract_origin attributes carry references to other DIEs. Nothing prevents the DIEs referred to from appearing later in .debug_info than the DIE containing the referring attribute, but dump_syms incompletly implemented its handling of these references, and was only able to resolve them when they were back-references. This will fix the chronic warnings produced by dump_syms of the form: dump_syms: the DIE at offset <offset> has a {DW_AT_specification, DW_AT_abstract_origin} attribute referring to the die at offset <offset>, which either was not marked as {a declaration, an inline}, or comes later in the file Patch by Greg Clayton Bug: breakpad:441 Change-Id: I98957d64a234c22afb6d0153f1bdc09e6a600b1d Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1946706 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Skip empty DWARF code range when mapping linesLudovic Guegan2018-11-211-3/+6
| | | | | | | | BUG=777 Change-Id: Ic6d05eee3ff4660b6d087999a8cea04a1ee3e92b Reviewed-on: https://chromium-review.googlesource.com/c/1333507 Reviewed-by: Ted Mielczarek <ted.mielczarek@gmail.com>
* Make a parameter a const referenceJoshua Peraza2018-08-171-1/+1
| | | | | | Change-Id: I7d232dd9be3a03b5bd9f1d46c307d080fadf9116 Reviewed-on: https://chromium-review.googlesource.com/1179978 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Treat high_pc as an address for DW_FORM_GNU_addr_indexJoshua Peraza2018-08-171-1/+2
| | | | | | | | | | The high_pc is an address and has already been read from .debug_addr before being passed into FuncHandler::ProcessAttributeUnsigned. Bug:870908 Change-Id: I950098e360b5193f26bf767b8fa0a5f9d59e66ce Reviewed-on: https://chromium-review.googlesource.com/1178760 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Add support for parsing the DW_AT_ranges attributesGabriele Svelto2018-08-131-61/+179
| | | | | | | | | | | | | | | | This enables the DWARF reader to properly parse DW_AT_ranges attributes in compilation units and functions. Code covered by a function is now represented by a vector of ranges instead of a single contiguous range and DW_AT_ranges entries are used to populate it. All the code and tests that assumed functions to be contiguous entities has been updated to reflect the change. DW_AT_ranges attributes found in compilation units are parsed but no data is generated for them as it is not currently needed. BUG=754 Change-Id: I310391b525aaba0dd329f1e3187486f2e0c6d442 Reviewed-on: https://chromium-review.googlesource.com/1124721 Reviewed-by: Ted Mielczarek <ted.mielczarek@gmail.com>
* Fall back to the raw symbol name from DW_AT_MIPS_linkage_name when there is ↵Mike Hommey2018-06-191-0/+7
| | | | | | | | | | | | | | | | nothing else When DW_AT_MIPS_linkage_name doesn't demangle, breakpad currently throws the symbol completely, but in some cases, there is no DW_AT_name or DW_AT_abstract_origin to figure out a name, and the raw value from DW_AT_MIPS_linkage_name is still better than nothing. Fall back to that in when there is nothing else. R=ted@mielczarek.org Change-Id: I5cc7580244f2b99f5f1f279d09b904031cae1a37 Reviewed-on: https://chromium-review.googlesource.com/1082176 Reviewed-by: Ted Mielczarek <ted.mielczarek@gmail.com>
* Allow compiling the google-breakpad code using a global ::string class ↵Ivan Penkov2016-11-081-1/+1
| | | | | | | | | | | | instead of std::string. For more details take a look at common/using_std_string.h BUG= Change-Id: Ifebfc57f691ef3a3bef8cfed7106c567985edffc Reviewed-on: https://chromium-review.googlesource.com/399738 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/+4
| | | | | | | | | | | | | | | | | 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-21/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 parentheses to silence clang warningPrimiano Tucci2016-05-031-1/+2
| | | | | | | | | | | | | | | | | | | | | crrev.com/1887033002 introuced a clang warning (see below). This fixes it, so that breakpad can be rolled in chrome, where warnings are always fatal. From: https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_dbg/builds/59031/steps/compile%20%28with%20patch%29/logs/stdio FAILED: clang_x64/obj/breakpad/dump_syms/dwarf_cu_to_module.o ../../breakpad/src/common/dwarf_cu_to_module.cc:420:20: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses] if (declaration_ && qualified_name || (unqualified_name && enclosing_name)) { ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ ~~ ../../breakpad/src/common/dwarf_cu_to_module.cc:420:20: note: place parentheses around the '&&' expression to silence this warning if (declaration_ && qualified_name || (unqualified_name && enclosing_name)) { ^ ( ) R=mark@chromium.org, petrcermak@chromium.org Review URL: https://codereview.chromium.org/1928363002 .
* Fix DWARF handling of inlined functions in namespacesTed Mielczarek2016-04-141-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently an inlined function in a namespace in DWARF will be given a name comprised of just `namespace::`. This is due to a logic error in ComputeQualifiedName, where it doesn't handle an empty `unqualified_name` properly. We apparently have a fair number of these in our Mac builds, an example of the DWARF that's being mishandled looks like: 0x117eda40: TAG_namespace [5] * AT_name( "js" ) AT_decl_file( "../../dist/include/js/Utility.h" ) AT_decl_line( 35 ) 0x11808500: TAG_subprogram [251] * AT_low_pc( 0x0000000002f12110 ) AT_high_pc( 0x0000000002f1216b ) AT_APPLE_omit_frame_ptr( 0x01 ) AT_frame_base( rsp ) AT_abstract_origin( {0x0000000011800a4f}"_ZN2js40TraceManuallyBarrieredGenericPointerEdgeEP8JSTracerPPNS_2gc4CellEPKc" ) AT_MIPS_linkage_name( "_ZN2js40TraceManuallyBarrieredGenericPointerEdgeEP8JSTracerPPNS_2gc4CellEPKc" ) AT_name( "TraceManuallyBarrieredGenericPointerEdge" ) AT_decl_file( "/builds/slave/rel-m-rel-m64_bld-000000000000/build/js/src/gc/Marking.cpp" ) AT_decl_line( 547 ) AT_external( 0x01 ) AT_APPLE_optimized( 0x01 ) AT_inline( DW_INL_inlined ) This turned a few instances of this in the file I was testing on into `<name omitted>`, which seems to just be a symptom of the "DW_AT_abstract_origin comes later in the file" issue. (Which is probably also worth fixing given that it occurs some 29k times when dumping symbols from Firefox's XUL binary, but it's a separate issue.) R=mark@chromium.org BUG= Review URL: https://codereview.chromium.org/1887033002 .
* convert to uint8_t* for binary data to fix -Wnarrowing build errorsMike Frysinger2016-01-261-2/+3
| | | | | | | | | | | | | | | 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 .
* Demangle symbol namehashimoto@chromium.org2015-02-031-1/+1
| | | | | | | | | | | | The spec says it should be demangled. https://code.google.com/p/google-breakpad/wiki/SymbolFiles BUG=chromium:453498 R=mark@chromium.org Review URL: https://breakpad.appspot.com/2854002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1421 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some fragile code that is likely to cause future memory corruptionerikchen@chromium.org2015-01-271-7/+21
| | | | | | | | | | | | | | | | | | problems. - The ordering of keys in stl containers cannot change. Make the relevant members const to guarantee this assumption. - Add handling and logging for demangle errors. - Fix a potential double-delete bug if a function passed to AddFunction() is already present. BUG=chromium:449214 R=mark@chromium.org Review URL: https://breakpad.appspot.com/10704002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1415 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a source of memory corruption.erikchen@chromium.org2015-01-261-7/+13
| | | | | | | | | | | This error was causing crashes in official Chrome Mac builds on 10.8.5 machines. BUG=chromium:449214 R=mark@chromium.org git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1414 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Both std::tr1::unordered_set and std::unordered_set are not allowed inivanpe@chromium.org2014-07-211-10/+1
| | | | | | | | | | | Google at this moment. This change is implementing a workaround that allows switching to hash_set and hash_map. R=mark@chromium.org Review URL: https://breakpad.appspot.com/6694002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1354 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix compilation error in Linux libc++ builds due to use of tr1/.mark@chromium.org2014-07-071-0/+8
| | | | | | | | | | | Patch by Sergey Matveev <earthdok@chromium.org> BUG=chromium:391792 Review URL: https://breakpad.appspot.com/7674002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1345 4c0a9323-5329-0410-9bdc-e9ce6186880e
* dump_syms: use unordered_set<> instead of set<> for speed.mark@chromium.org2014-06-261-4/+4
| | | | | | | | | | | | | dump_syms spends a lot of time trying to compare strings. This change speeds up processing of libwebviewchromium.so by 30% on my linux machine. Patch by Junichi Uekawa <uekawa@chromium.org> Review URL: https://breakpad.appspot.com/2714002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1341 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a memory leak in DwarfCUToModule::FuncHandler::Finish().thestig@chromium.org2014-05-281-2/+2
| | | | | | | | | BUG=591 R=mark@chromium.org Review URL: https://breakpad.appspot.com/2704002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1333 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Cleanup: Use scoped_ptr where appropriate in DwarfCUToModule.thestig@chromium.org2013-04-241-10/+9
| | | | | | Review URL: https://breakpad.appspot.com/572002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1164 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add an option to not handle DWARF inter-compilation unit references in Linux ↵thestig@chromium.org2013-04-241-26/+72
| | | | | | | | | | dump_syms. This saves a lot of memory for dump_syms. Review URL: https://breakpad.appspot.com/565002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1163 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Minor Android fixup for symbol dumping codeted.mielczarek@gmail.com2013-03-061-4/+9
| | | | | | | Patch by Julian Seward <jseward@acm.org> R=digit at https://breakpad.appspot.com/521002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1123 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add missing "using std::sort" to dwarf_cu_to_module.cc.ted.mielczarek@gmail.com2013-02-281-0/+1
| | | | | | Patch by Julian Seward <jseward@acm.org>, R=ted git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1117 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Include the compilation directory for FILE entries, making them absolute ↵ted.mielczarek@gmail.com2013-01-231-5/+13
| | | | | | | | instead of relative A=Ryan Sleevi <rsleevi@chromium.org> R=mark,ted at https://breakpad.appspot.com/385001/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1106 4c0a9323-5329-0410-9bdc-e9ce6186880e
* DWARF can store DW_AT_high_pc as either an address or a constant. In the latterjimblandy2013-01-081-2/+13
| | | | | | | | | case it's the length of the function. breakpad always treats it as an address. a=mattdr, r=jimb git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1094 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Remove dead code.mark@chromium.org2012-12-121-8/+4
| | | | | | | | | Patch by Rafael Espindola <rafael.espindola@gmail.com> Review URL: http://breakpad.appspot.com/502003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1091 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Comment out unused arguments in definitions, as required by the Google C++ ↵jimblandy2012-10-051-3/+3
| | | | | | | | | | Style Guide. A=Rafael Ávila de Espíndola <respindola@mozilla.com> R=jimb at https://breakpad.appspot. com/479003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1064 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix out-of-date comment for DwarfCUToModule::FilePrivate::common_strings.jimblandy2012-10-051-6/+14
| | | | | | | No review. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1063 4c0a9323-5329-0410-9bdc-e9ce6186880e
* If a specification DIE has a DW_AT_MIPS_linkage_name attribute, don't failjimblandy2012-10-051-20/+39
| | | | | | | | | | | to add it to the specifications table. Record the fully-qualified name provided by the demangler in the table. A=Rafael Ávila de Espíndola <respindola@mozilla.com> R=jimb at https://breakpad.appspot. com/478004/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1062 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use DW_AT_MIPS_linkage_name if it is available to get names of functions ↵ted.mielczarek@gmail.com2012-10-041-10/+35
| | | | | | | | with arguments during symbol dumping. A=Rafael Ávila de Espíndola <respindola@mozilla.com> R=ted at https://breakpad.appspot.com/457002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1059 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix compiler warning from format stringted.mielczarek2012-04-251-1/+1
| | | | | | | Patch by Chris Dearman <chris@mips.com> R=ted at http://breakpad.appspot.com/369002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@958 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Changes to get the breakpad client compiling and running on Android usingmark@chromium.org2012-04-031-1/+5
| | | | | | | | | | | ndk-7b. Patch by Carlos Valdivia <carlosvaldivia@google.com> Review URL: https://breakpad.appspot.com/363001/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@945 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add some unit tests for Linux WriteSymbolFileted.mielczarek2011-07-061-0/+1
| | | | | | | | | | | This patch adds synth_elf::{StringTable,SymbolTable,ELF} classes to produce in-memory ELF files to properly test the Linux symbol dumping code. It also uses those classes to add some basic tests for the WriteSymbolFile function. R=jimb at http://breakpad.appspot.com/277001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@794 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Google Breakpad Issue 417: Handle DWARF that omits function names.jimblandy2011-03-111-1/+14
| | | | | | | | | | | | | | | This patch makes sure dump_syms behaves properly when presented with malformed DWARF data that provides no name for a function. We print a warning message to stderr, and subsitute "<name omitted>" for the empty string, so that the "FUNC" record written to the symbol file for the function is still well-formed. (We may have line number data covering the function, so it would be a shame to omit the function altogether.) Unit tests included. a=jimblandy, r=ted.mielczarek git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@779 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix assert failure in dump_syms caused by binary linked with gold.thestig@chromium.org2010-11-081-2/+2
| | | | | | | | | Original review: http://breakpad.appspot.com/224001 A=raymes R=ccoutant Review URL: http://breakpad.appspot.com/227001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@729 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use <inttypes.h> macros for formatting fixed-width types.mark@chromium.org2010-08-271-1/+7
| | | | | | Review URL: http://breakpad.appspot.com/162002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@676 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux/Mac symbol dumper: Share duplicate strings that arise in ↵jimblandy2010-07-171-1/+26
| | | | | | | | | | | | | | DWARF data. This patch avoids allocating many copies of identical strings appearing in debugging information. Without this patch, running dump_syms on Mozilla's libxul.so (with 173MiB of debugging information) has a peak resident set of around 450MiB. With this patch, the peak is around 365MiB. a=jimblandy, r=mark git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@626 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: Avoid using the C++ <cfoo> headers.ted.mielczarek2010-06-251-2/+4
| | | | | | | | | | | | 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