aboutsummaryrefslogtreecommitdiff
path: root/src/processor/minidump_stackwalk.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Communicate OS and CPU to SymbolSupplier (#107). r=brynermmentovai2007-01-101-4/+5
| | | | | | | | | | Interface change: moved a few fields around in ProcessState; added new arguments to Stackwalker and SymbolSupplier. http://groups.google.com/group/airbag-dev/browse_thread/thread/17e4a48ec3ede932 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@101 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add an abstract interface to SourceLineResolver, and allow any implementationbryner2006-12-111-1/+4
| | | | | | | | | to be used with MinidumpProcessor. The basic SourceLineResolver is now a public interface (#89) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@83 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Provide a mechanism for SymbolSuppliers to interrupt processing (#93)bryner2006-12-081-17/+17
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@80 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Module API (#32). r=waylonis, brynermmentovai2006-12-051-3/+32
| | | | | | | | | | | | | | | | | | | - Introduces a standard API for dealing with modules. MinidumpModule is now a concrete implementation of this API. Code may interact with single modules using the CodeModule interface, and collections of modules using its container, the CodeModules interface. - CodeModule is used directly by SymbolSupplier implementations and SourceLineResolver. Reliance on the specific implementation in MinidumpModule has been eliminated. - Module lists are now added to ProcessState objects. Module references in each stack frame are now pointers to objects in these module lists. - The sample minidump_stackwalk tool prints the module list after printing all threads' stacks. http://groups.google.com/group/airbag-dev/browse_frm/thread/a9c0550edde54cf8 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@74 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Limit use of default namespace in tests and utility programs (#71). r=brynermmentovai2006-11-091-0/+4
| | | | | | | | | | - main is now the only thing you'll find in the default namespace. Everything else has been moved into an unnamed namespace. http://groups.google.com/group/airbag-dev/browse_thread/thread/14130a0284a0307f git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@63 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Suppress handler thread from appearing in MinidumpProcessor's ProcessStatemmentovai2006-11-061-7/+9
| | | | | | | | | | | | (#65). r=bryner - Interface change: (ProcessState).crash_thread is now requesting_thread and will be populated for non-crash dumps. If the requesting thread cannot be determined, requesting_thread is set to -1. http://groups.google.com/group/airbag-dev/browse_thread/thread/c422ec481a2db440 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@62 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Move headers for exported interfaces into src/google_airbag (#51). r=brynermmentovai2006-11-061-5/+5
| | | | | | | http://groups.google.com/group/airbag-dev/browse_thread/thread/e01f177386e8794a git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@60 4c0a9323-5329-0410-9bdc-e9ce6186880e
* minidump_stackwalk should use MinidumpProcessor (#64). r=brynermmentovai2006-10-271-68/+170
| | | | | | | | | | | | | | | | | | | | | | | - minidump_stackwalk is now much more useful as a debugging tool and even as a standalone tool. - Reimplementation of minidump_stackwalk around MinidumpProcessor. - minidump_stackwalk displays all pertinent information returned by MinidumpProcessor in the ProcessState. - New PathnameStripper::File static utility method to display only the leaf file name in a pathname, cleaning up minidump_stackwalk's output. - New SimpleSymbolSupplier class, which implements a simple filesystem-based symbol supplier compatible with the layout used by Microsoft Symbol Server and its client cache. - minidump_stackwalk now accepts an optional second argument, a pathname to use as a symbol directory for a SimpleSymbolSupplier. - Updated test data to be compatible with SimpleSymbolSupplier, and added test data for kernel32.pdb. Test data converted from CRLF line endings to LF. http://groups.google.com/group/airbag-dev/browse_thread/thread/cce30a84f6b2d728 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@53 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix minor style problems (#58). r=brynermmentovai2006-10-251-1/+1
| | | | | | | http://groups.google.com/group/airbag-dev/browse_thread/thread/bbcecab979fa82bc git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@49 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Replace auto_ptr with scoped_ptr (#56). r=brynermmentovai2006-10-231-4/+4
| | | | | | | http://groups.google.com/group/airbag-dev/browse_thread/thread/54c66451ed8e2835 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@46 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make stack_frame_info vector hold linked_ptrs instead of objects;mmentovai2006-10-231-4/+3
| | | | | | | | | | | | | make Stackwalker::Walk create and return a CallStack instead of filling a caller-supplied one (#54). r=bryner Interface change: Stackwalker::Walk and MinidumpProcessor::Process now return a new CallStack*. http://groups.google.com/group/airbag-dev/browse_thread/thread/d2bad5d7c115c3fe git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@45 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Handle frame pointer omission, (#21), part 4 (final part!): FPO stackwalker.mmentovai2006-10-201-9/+10
| | | | | | | | | | | | | r=bryner - This change allows Airbag to properly walk win32 stacks produced by code built with MSVC's frame pointer omission optimization (/Oy). This optimization is enabled at /O1 and /O2. - There too many interface and file format changes to list here. http://groups.google.com/group/airbag-dev/browse_thread/thread/85ce85bfa8457ece git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@42 4c0a9323-5329-0410-9bdc-e9ce6186880e
* ppc stackwalker (#30). r=brynermmentovai2006-09-251-13/+28
| | | | | | | | | | | | - Implementation of PowerPC stackwalker. Tested using stackwalker_selftest (#18). - Hook up processor-side multi-CPU support in MinidumpProcessor and minidump_stackwalk using the new Stackwalker::StackwalkerForCPU method. http://groups.google.com/group/airbag-dev/browse_thread/thread/1c2fa7c5182a77a9 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@34 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Relicense to BSD (#29). r=brynermmentovai2006-09-201-10/+25
| | | | | | | http://groups.google.com/group/airbag-dev/browse_thread/thread/5f19f13fc172c4e0 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@31 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Follow-up to #26: get rid of supplier_data, it's not really needed sincebryner2006-09-201-1/+1
| | | | | | | the caller can implement their own supplier object. r=mmentovai. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@27 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Change interface for providing files to Minidump (#19). r=brynermmentovai2006-09-081-17/+4
| | | | | | | | | | | | - Interface change: Minidump constructor now accepts a const string& path argument instead of int fd. Minidump will open the file on first Read and close it upon destruction. - Adapt callers to new interface, no longer leaking file descriptors. http://groups.google.com/group/airbag-dev/browse_thread/thread/ff24dbcde7db8ae3 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@20 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add support to the StackWalker for resolving symbols, using abryner2006-09-081-11/+6
| | | | | | | | | | | | caller-implemented SymbolSupplier object to get a symbol file. Add a CrashReportProcessor object which provides a simple API for processing a CrashReport struct, given a SymbolSupplier and a minidump file. r=mmentovai (#17)) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@18 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Initial implementation of x86 stackwalker (#9). r=brynermmentovai2006-09-061-0/+118
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@12 4c0a9323-5329-0410-9bdc-e9ce6186880e