aboutsummaryrefslogtreecommitdiff
path: root/src/processor/stackwalker_arm_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* fix pointer style to match the style guideMike Frysinger2020-07-151-22/+22
| | | | | | | | | | 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>
* fix build failuresJoshua Peraza2019-06-111-0/+1
| | | | | | Change-Id: I9e745d2a4b3f780941ba286bbafa5d4169d172f7 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1653863 Reviewed-by: Mark Mentovai <mark@chromium.org>
* iOS: disable using CFI in stackwalkingJoshua Peraza2018-07-061-2/+6
| | | | | | | | | | | dump_syms produces incomplete CFI info on iOS because it doesn't support converting compact unwind to Breakpad symbols. Attempting to use incomplete CFI can result in infinte stack traces. Bug: google-breakpad:764 Change-Id: Id042aa515d17928cb5503a79038607d95c56238d Reviewed-on: https://chromium-review.googlesource.com/1128252 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Increasing the Breakpad stack walker max scan limit from 30 to 40.Ivan Penkov2015-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Chrome started hitting some crashes in v8 jitted code which happens to be non ABI compliant and debuggers (including WinDBG) are unable to produce meaningful stack traces. The Breakpad stack walker has some builtin heuristics to deal with such cases. More specifically, when unable to find a good parent frame, it scans the raw stack to find a suitable parent frame. The max scan size was set at 30 pointers which was (apparently) not enough to recover in this case. I'm increasing it to 40 pointers. I confirmed that at 34 pointers it was able to recover however I'm setting it to 40 in order to it some slack. I needed to update two unittests which were expecting the previous scan limit. BUG= R=mark@chromium.org Review URL: https://codereview.chromium.org/1379433005 .
* Allow setting a limit on the number of frames to be recovered by stack scanning.ted.mielczarek@gmail.com2013-08-191-0/+59
| | | | | | Patch by Julian Seward <jseward@acm.org> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=894264 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1206 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Detect corrupt symbol files during minidump processing. Recover from the ↵ivan.penkov@gmail.com2013-07-111-14/+49
| | | | | | | | | | | | | | | | | | | | | 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
* Avoid gmock warning "Uninteresting mock function call"ted.mielczarek@gmail.com2013-05-171-0/+5
| | | | | | Patch by Michael Krebs <mkrebs@chromium.org>, R=me at https://breakpad.appspot.com/397002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1183 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Keeping track of modules without symbols during crash report processing.ivan.penkov@gmail.com2013-03-061-11/+42
| | | | | | | | 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-11/+11
| | | | | | R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow StackwalkerARM to scan much farther to find the caller of the context ↵ted.mielczarek@gmail.com2012-12-041-0/+57
| | | | | | | | frame R=jimb at https://breakpad.appspot.com/501002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1086 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Cleaning up google-breakpad source code of signed-unsigned comparison warningsivan.penkov@gmail.com2012-11-211-6/+6
| | | | | | | | 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/+15
| | | | | | r=mkrebs at https://breakpad.appspot.com/413002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1077 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Refactor the logic of resolving source line info into helper class.SiyangXie@gmail.com2012-10-101-10/+20
| | | | | | | http://breakpad.appspot.com/459002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1068 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fixing a mem leak in test codeivan.penkov@gmail.com2012-06-291-3/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@975 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
* Use frame pointer to walk ARM stack on iOS.qsr@chromium.org2011-10-171-12/+190
| | | | | | Review URL: http://breakpad.appspot.com/314001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@869 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some apparently longstanding crash bugs in Stackwalker implementations ↵ted.mielczarek2011-01-241-3/+21
| | | | | | | | when resolver is NULL. R=mark at http://breakpad.appspot.com/257001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@761 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Refactor source line resolver, add interface in supplier and resolver.SiyangXie@gmail.com2010-10-071-3/+6
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@711 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add stack-scanning fallback to Stackwalker{AMD64,ARM}.ted.mielczarek2010-10-011-0/+123
| | | | | | R=jimb at http://breakpad.appspot.com/206001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@704 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Refactor some bits of StackWalkerX86 / StackFrameX86 out into their ↵ted.mielczarek2010-10-011-0/+2
| | | | | | | | 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
* Fix unit tests that have not built since @610ted.mielczarek2010-07-231-3/+3
| | | | | | | A=kmixter R=ted http://breakpad.appspot.com/132001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@629 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad test support: Move test_assembler.{h,cc} from src/processor to ↵jimblandy2010-04-271-1/+1
| | | | | | | | | | | | | | src/common. The google_breakpad::TestAssembler classes are used in both the processor's and the Linux dumper's test suites, and will soon be used in the Mac dumper's tests as well. This patch moves their source files from src/processor to src/common. a=jimblandy, r=thestig git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@574 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Support DWARF CFI-driven stack walking on ARM.jimblandy2010-03-161-0/+440
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