aboutsummaryrefslogtreecommitdiff
path: root/src/processor/minidump_stackwalk.cc
Commit message (Collapse)AuthorAgeFilesLines
* fix pointer style to match the style guideMike Frysinger2020-07-151-1/+1
| | | | | | | | | | 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>
* Provide helper wrappers for basename(3) and dirname(3)Tobias Sargeant2017-10-181-1/+2
| | | | | | | | | | This hides the need to provide mutable C strings, and unifies existing basename calls and variations in a single location. Change-Id: Idfb449c47b1421f1a751efc3d7404f15f8b369ca Reviewed-on: https://chromium-review.googlesource.com/725731 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Convert {mini|micro}dump_stackwalk argument parsing to getopt.Tobias Sargeant2017-10-161-60/+70
| | | | | | | Bug: google-breakpad:748 Change-Id: I70b16ba6456df0be038d6c7170eb22b093fdc65d Reviewed-on: https://chromium-review.googlesource.com/718756 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Increase maximum number of regions for minidump_stackwalk.Lars Volker2017-07-281-1/+3
| | | | | | | | | | Change I361d8812df7b2977fe2630289059d31c3c9a4cc3 increased the maximum number of threads for minidump_stackwalk. This change also increases the maximum number of regions. Change-Id: I61efd4453df8809bd9cd657546d1d6727cd10281 Reviewed-on: https://chromium-review.googlesource.com/588384 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Increase maximum number of threads for minidump_stackwalk.Lars Volker2017-03-281-0/+4
| | | | | | | | BUG= Change-Id: I361d8812df7b2977fe2630289059d31c3c9a4cc3 Reviewed-on: https://chromium-review.googlesource.com/459010 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Revert "Added a switch to dump minidump modules in minidump_stackwalk."Lei Zhang2016-02-101-20/+5
| | | | | | | | | | | This reverts commit cb936a0243c97ae9cd2d4bb19d95dde0421fed6d. A=dyen@chromium.org Original Review: https://codereview.chromium.org/1672773002/ R=dyen@chromium.org Review URL: https://codereview.chromium.org/1688493003 .
* Added a switch to dump minidump modules in minidump_stackwalk.Lei Zhang2016-01-291-5/+20
| | | | | | | | | | | | In order to figure out what symbols we need associated to a minidump, it is useful to be able to dump all the modules the minidump contains. A=dyen@chromium.org Original Review: https://codereview.chromium.org/1651593002/ BUG=563716 R=dyen@chromium.org Review URL: https://codereview.chromium.org/1650713002 .
* Add stack contents output functionality to minidump_stackwalkhashimoto@chromium.org2015-02-271-8/+27
| | | | | | | | | | | | | | | | | This feature is enabled only when "-s" is provided as a commandline option. minidump_stackwalk.cc: - Add a new commandline option "-s" to output stack contents. - Instantiate Minidump object in PrintMinidumpProcess() to keep it alive longer so that accessing process_state.thread_memory_regions() in stackwalk_common.cc doesn't result in use-after-free. stackwalk_common.cc: - Add a new function PrintStackContents() to output stack contents. R=mark@chromium.org Review URL: https://breakpad.appspot.com/9774002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1429 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Introduce microdump_stackwalk comand line executableprimiano@chromium.org2014-11-251-734/+9
| | | | | | | | | | | | | | | This introduces the microdump_stackwalk binary which takes advantage of the MicrodumpProcessor to symbolize microdumps. Its operation is identical to the one of minidump_stackwalk. This CL, in fact, is also refactoring most of the common bits into stackwalk_common. BUG=chromium:410294 R=mmandlis@chromium.org Review URL: https://breakpad.appspot.com/4704002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1405 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Print more x86-64 registers in minidump_stackwalkted.mielczarek@gmail.com2014-05-301-4/+22
| | | | | | | | R=mark@chromium.org Review URL: https://breakpad.appspot.com/7654002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1335 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Process minidumps generated on ARM64 in iOS apps.mark@chromium.org2013-11-231-1/+140
| | | | | | | | | | | Patch by Colin Blundell <blundell@chromium.org> BUG=542 Review URL: https://breakpad.appspot.com/704002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1236 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Adding support for mips.gordana.cmiljanovic@imgtec.com2013-09-111-1/+58
| | | | | | | | | | | | | Support for mips cpu is added to all breakapad targets including unittests. BUG=none TEST=unittests Review URL: https://breakpad.appspot.com/614002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1212 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Detect corrupt symbol files during minidump processing. Recover from the ↵ivan.penkov@gmail.com2013-07-111-6/+14
| | | | | | | | | | | | | | | | | | | | | errors and use the good data if possible. More specifically: - Detect corrupt symbols during minidump processing and provide the list of modules with corrupt symbols in the ProcessState. This will allow listing the corrupt symbol files in the final crash report. - Skip and recover from symbol data parse errors - don't give up until 100 parse errors are seen. - In order to recover from '\0' (null terminator) in the middle of a symbol file, a couple of methods have to be updated to require both buffer pointer and length. Previously they required only a buffer pointer (char *) and the size of the buffer was evaluated using strlen which is not reliable when the data is corrupt. Most of the changes are due to these signature updates. - Added and updated unittests. Also, updated minidump_stackwalk to show a WARNING for corrupt symbols. Output looks like this: ... Loaded modules: 0x000da000 - 0x000dafff Google Chrome Canary ??? (main) 0x000e0000 - 0x0417dfff Google Chrome Framework 0.1500.0.3 (WARNING: Corrupt symbols, Google Chrome Framework, 4682A6B4136436C4BFECEB62D498020E0) 0x044a8000 - 0x04571fff IOBluetooth 0.1.0.0 ... Review URL: https://breakpad.appspot.com/613002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1200 4c0a9323-5329-0410-9bdc-e9ce6186880e
* minidump_stackwalk should display r12 in ARM stack tracested.mielczarek@gmail.com2013-04-171-0/+2
| | | | | | A=torne@google.com, R=ted, http://code.google.com/p/google-breakpad/issues/detail?id=456 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1151 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Keeping track of modules without symbols during crash report processing.ivan.penkov@gmail.com2013-03-061-9/+48
| | | | | | | | http://breakpad.appspot.com/534002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1126 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use stdint types everywhereted.mielczarek@gmail.com2013-03-061-8/+8
| | | | | | R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
* minidump_stackwalk: Show argument registers for ARM stack tracested.mielczarek@gmail.com2013-01-311-0/+11
| | | | | | Patch by Michael Krebs <mkrebs@chromium.org>, R=ted at https://breakpad.appspot.com/497002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1108 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Print the correct return address, even on architectures where ↵jimblandy2013-01-221-8/+12
| | | | | | | | | StackFrame::instruction is offset. a=bruce.dawson, r=jimblandy git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1105 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Move scoped_ptr.h to commonted.mielczarek@gmail.com2013-01-171-1/+1
| | | | | | R=mark at https://breakpad.appspot.com/509002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1096 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Cleaning up google-breakpad source code of signed-unsigned comparison warningsivan.penkov@gmail.com2012-11-211-2/+2
| | | | | | | | http://breakpad.appspot.com/488002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1083 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow processing dumps with missing stack memory for some threadsted.mielczarek@gmail.com2012-11-061-0/+3
| | | | | | r=mkrebs at https://breakpad.appspot.com/413002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1077 4c0a9323-5329-0410-9bdc-e9ce6186880e
* This change allows compiling the google-breakpad code using a global ↵ivan.penkov@gmail.com2012-06-281-2/+2
| | | | | | ::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
* Fix printing of x86_64 registers from minidump_stackwalkted.mielczarek2011-02-141-15/+35
| | | | | | R=mark at http://breakpad.appspot.com/262001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@772 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Refactor some bits of StackWalkerX86 / StackFrameX86 out into their ↵ted.mielczarek2010-10-011-28/+5
| | | | | | | | respective parent classes so they can be used by other architecture implementations. R=jimb at http://breakpad.appspot.com/205001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@703 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Avoid using the C++ <cfoo> headers.ted.mielczarek2010-06-251-3/+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 stack walker: remove embedded newlines from module names.jimblandy2010-04-151-0/+4
| | | | | | | | | | | | | | | | pdb filenames in crash reports may contain embedded newlines. When minidump-stackwalk prints these lines, it ends up with: Module|olek8r4u.dll|6.0.6000.16386|\\xc2\\xeb\\x17\\x04J\\xb6:\\xbaT\\xf3\\xef\\xe8Y\\x90\\x86\\xaa\\xe5\\x16n\\xb1\\x80\\x85\\t\\x12!\\x16\\x0f\\x98\\xf8\\x89\\x16"\\x96\\xd4\\x84\\x88\\xea\\xe3\\r\\r\\x1b\\xca\\x85*^h\\xf5\\xdc\n\\xd9\\xf4}j\\x1d7\\xe39o\\x1f\\xc5\\xc4\\xa6x\\x8ba\\xe8\\xd6K\\x89H\\xe1\\xff\\xe7\\xf5\\xf0Y\\xfd\\xf5\\xdbu\\x0c\\x07\\x86\\xed|29E0B04FCCBE47EB86A6C819E8B89D051|0x00f60000|0x00ff2fff|0\n Which has an embedded newline and the machine parser can't handle it. This patch just strips the embedded newline, just as we strip embedded | separator characters. a=bsmedberg, r=jimblandy git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@571 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Support AMD64 stack unwinding driven by DWARF CFI.jimblandy2010-03-161-0/+10
| | | | | | | | | | | This adds support for 'STACK CFI' records (DWARF CFI) to the AMD64 stack walker. This is necessary for the stack trace to include any frames other than the youngest. Unit tests are included. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@554 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Support DWARF CFI-driven stack walking on ARM.jimblandy2010-03-161-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows the Breakpad minidump processor to use data from STACK CFI records to generate stack traces for the ARM processor. In the symbol dumper, we need a table mapping DWARF CFI register numbers to their names: STACK CFI records refer to registers by name. In the processor, we expand StackwalkerARM::GetCallerFrame to see if there are STACK CFI records covering the callee, and then use those to recover the caller's register values. There's no good reason the ARM walker couldn't use the SimpleCFIWalker interface declared in cfi_frame_info.h. Unfortunately, that interface assumes that one can map register names to member pointers of the raw context type, while MDRawContextARM uses an array to hold the registers' values: C++ pointer-to-member types can't refer to elements of member arrays. So we have to write out SimpleCFIWalker::FindCallerRegisters in StackwalkerARM::GetCallerFrame. We define enum MDARMRegisterNumbers in minidump_cpu_arm.h, for convenience in referring to certain ARM registers with dedicated purposes, like the stack pointer and the PC. We define validity flags in StackFrameARM for all the registers, since CFI could theoretically recover any of them. In the same vein, we expand minidump_stackwalk.cc to print the values of all valid callee-saves registers in the context --- and use the proper names for special-purpose registers. We provide unit tests that give full code and branch coverage (with minor exceptions). We add a testing interface to StackwalkerARM that allows us to create context frames that lack some register values. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@553 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
* Print ARM register values in minidump_stackwalk. r=nealsid at ↵ted.mielczarek2010-02-091-0/+11
| | | | | | http://breakpad.appspot.com/57002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@516 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Avoid warnings building with G++ 4.4.1 using -O3 -Wall.jimblandy2010-01-121-0/+1
| | | | | | | | | | | src/processor/minidump.cc:1067: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 3 has type ‘unsigned int’ src/processor/stackwalker_arm.cc:83: warning: unused variable ‘last_frame’ src/processor/minidump_stackwalk.cc:163: warning: ‘trust_name’ may be used uninitialized in this function a=jimblandy, r=ted.mielczarek git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@481 4c0a9323-5329-0410-9bdc-e9ce6186880e
* issue 170 - Report assertion type in minidump_stackwalk output. r=mark at ↵ted.mielczarek2009-12-021-1/+14
| | | | | | http://breakpad.appspot.com/45001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@433 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Let x86 stackwalker scan stack in cases where program evaluation fails. ↵ted.mielczarek2009-10-081-0/+22
| | | | | | Original patch by Jeff Muizelaar <jmuizelaar@mozilla.com> with some changes by me. r=mento at http://breakpad.appspot.com/32003/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@409 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add more error information to minidump processing return code. Also added ↵nealsid2009-05-291-1/+1
| | | | | | | | | | | dependency on google test, and modified minidump processing unit tests to use google test R=brdevmn A=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@343 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix minidump_stackwalk compilation on gcc 4.3. Patch by Jim Blandyted.mielczarek2009-05-281-0/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@342 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use "%" PRIx64 instead of "%llx" for 64-bit portability.bryner2008-03-041-2/+2
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@243 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use "%" PRIx64 instead of "%llx" (#241). r=brynermmentovai2008-02-251-32/+34
| | | | | | | http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/327dc5326077e48d git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@241 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 196 - Breakpad processor support for x86-64. r=mentoted.mielczarek2007-10-311-1/+11
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@227 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add SPARC/Solaris support to client handler and processor (#201, 200).mmentovai2007-09-261-0/+11
| | | | | | | | | Patch by Michael shang <satisfy123>. r=me, r=Alfred Peng. http://groups.google.com/group/google-breakpad-discuss/browse_thread/thread/2fba07577f1fa35e git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@215 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow building with -pedantic (#186). r=ted.mielczarekmmentovai2007-05-311-4/+6
| | | | | | | http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/6aa39d7f0ffa3c42 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@183 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 143 - MinidumpProcessor should extract number of processors. r=mentoted.mielczarek2007-05-301-3/+8
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@180 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Provide for logging initialization routines (#179). r=brynermmentovai2007-05-251-1/+4
| | | | | | | http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/4b196ca0b6d7f9a6 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@177 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 168 - Output debug file and debug identifier in minidump_stackwalk ↵ted.mielczarek2007-05-161-2/+7
| | | | | | machine-readable output. r=mento git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@168 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Extraneous newline in format stringted.mielczarek2007-05-081-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@161 4c0a9323-5329-0410-9bdc-e9ce6186880e
* oops, committed accidentallyted.mielczarek2007-05-041-5/+2
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@157 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 160 - Reviewer Chris Rogersted.mielczarek2007-05-041-2/+5
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@156 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Rename Airbag to Breakpad.mmentovai2007-02-141-21/+21
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@122 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add module list to machine-readable minidump_stackwalk output (#119).mmentovai2007-01-291-2/+38
| | | | | | | | | Patch by Ted Mielczarek. r=me http://groups.google.com/group/airbag-dev/browse_thread/thread/144e66b1de80b1db git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@114 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Qualify string and vector with std namespace when used withoutmmentovai2007-01-251-1/+1
| | | | | | | | | using-declaration (#118). r=bryner http://groups.google.com/group/airbag-dev/browse_thread/thread/4946d156a37331df git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@113 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Support machine-readable output format from minidump_stackwalk;mmentovai2007-01-251-36/+199
| | | | | | | | | | Support multiple symbol paths in SimpleSymbolSupplier (#113). Patch by Ted Mielczarek. r=me http://groups.google.com/group/airbag-dev/browse_thread/thread/44b91a9112618b26 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@112 4c0a9323-5329-0410-9bdc-e9ce6186880e