aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf_cu_to_module.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Breakpad DWARF support: Check for DWARF line info under Mac OS X section names.ted.mielczarek2010-06-251-0/+4
| | | | | | | | | | For some reason, Mac OS X places DWARF debugging information in sections whose names begin with "__", rather than the names beginning with "." given in the DWARF spec. This patch changes google_breakpad::DwarfCUToModule to look for line number information under both names. A=jimb R=mark git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@612 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad symbol dumper: Move Linux dumping classes into src/common.jimblandy2010-04-051-0/+881
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