aboutsummaryrefslogtreecommitdiff
path: root/src/processor
Commit message (Collapse)AuthorAgeFilesLines
...
* Breakpad: Add minidump processor support for DWARF Call Frame Information.jimblandy2010-03-1611-27/+1673
| | | | | | | | | | | | | | | | | | | | | | | | Add a CFIFrameInfo class (named for symmetry with WindowsFrameInfo) to represent the set of STACK CFI rules in effect at a given instruction, and apply them to a set of register values. Provide a SimpleCFIWalker class template, to allow the essential CFI code to be shared amongst the different architectures. Teach BasicSourceLineResolver to partially parse 'STACK CFI' records, and produce the set of rules in effect at a given instruction on demand, by combining the initial rule set and the appropriate rule deltas in a CFIFrameInfo object. Adapt StackwalkerX86 and StackFrameX86 to retrieve, store, and apply CFI stack walking information. Add validity flags for all the general-purpose registers to StackFrameX86::ContextValidity. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@549 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Unit tests for StackwalkerX86.jimblandy2010-03-162-0/+879
| | | | | | | | | | | | | Issue 53001 (http://breakpad.appspot.com/53001) defines the TestAssembler classes; those, along with a new set of mock classes defined in stackwalker_unittest_utils.h, make it possible for us to actually do proper unit testing of a stack walker. These tests get us full code coverage for stackwalker_x86.cc. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@548 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Processor: Add new unit tests for google_breakpad::Minidumpjimblandy2010-03-168-6/+4102
| | | | | | | | | | | | | | This also adds two new test utility class groups, TestAssembler and SynthMinidump. These are overkill for what I'm doing with them here (and may simply be overkill, period), but they make it easy to write unit tests for code that works on binary files or raw memory contents in a cross-platform way. I'm planning to use them for the DWARF CFI unwinding tests and the DWARF CFI parser tests. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@547 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix to cache NOT_FOUND results from symbol supplier on a per-minidump basis nealsid2010-03-032-0/+60
| | | | | | | | | | | http://breakpad.appspot.com/64001 R=ted.mielczarek, brdevmn A=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@543 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Support negative literals in the postfix evaluator.jimblandy2010-02-241-4/+18
| | | | | | | | | | | | | Some versions of the libstdc++, the GNU standard C++ library, have stream extractors for unsigned integer values that permit a leading '-' sign (6.0.13); others do not (6.0.9). Regardless of the behavior of the extractors, Breakpad postfix expressions should support negative literals. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@537 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Update copyright notice years on all files changed in 2010.jimblandy2010-02-0920-20/+20
| | | | | | | | | | 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 processor: Move STACK WIN record parsing into its own function.jimblandy2010-02-051-29/+39
| | | | | | | | | | | This looks a little odd right now, since ParseStackInfo has only one alternative to handle, but I think breaking this out should make the subsequent addition of STACK CFI record support easier to review. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@514 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Give Windows stack data Windows-specific names.jimblandy2010-02-052-46/+50
| | | | | | | | | | | | | | | | | | | | | Rename BasicSourceLineResolver::Module::StackInfoTypes to WindowsFrameInfoTypes. This enum really describes the forms of Windows-specific stack unwinding data (STACK WIN records), and its name should reflect that, especially since we'll be adding support for other kinds of stack walking information. The 'stack' -> 'frame' shift matches the naming of the WindowsFrameInfo type. Similarly, rename BasicSourceLineResolver::Module::stack_info_ to windows_frame_info_. Do similar renamings in basic_source_line_resolver_unittest.cc. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@513 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Segregate STACK WIN vs. traditional stack walking.jimblandy2010-02-052-170/+246
| | | | | | | | | | | | | This patch moves the code for finding caller frames using STACK WIN data and the code to do so using the traditional frame layout (%ebp points at saved %ebp, pushed just after return address) into their own functions. In addition to making things a little clearer, this is preparation for adding support for STACK CFI records into the mix. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@512 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Support evaluating a postfix expression to produce a value.jimblandy2010-02-053-14/+151
| | | | | | | | | | This adds an EvaluateForValue member function to PostfixEvaluator, and along with appropriate unit tests. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@511 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad x86 Stack Walker: Pass "out" parameters by address, not reference.jimblandy2010-02-052-8/+8
| | | | | | | | | | | | The Google C++ Style Guide requires all parameters passed by reference to be labeled 'const', and says that pointers should be used for output arguments. This patch brings google_breakpad::StackwalkerX86 into line. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@510 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Make PostfixEvaluator treat the MemoryRegion as const.jimblandy2010-02-053-18/+18
| | | | | | | | | | | | | | | | In order to be able to treat any MemoryRegion as const, the accessor functions need to be declared this-const, which means annotations on all the subclasses, etc. etc. Since MinidumpMemoryRegion fills its memory_ member on demand, that member needs to be marked 'mutable', but this is exactly the sort of situation the 'mutable' keyword was intended for, so that seems all right. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@509 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Save Windows unwinding data earlier in x86 walker.jimblandy2010-02-051-3/+4
| | | | | | | | | | | | | | | | | | | At the moment, StackwalkerX86::GetCallerFrame doesn't save the WindowsFrameInfo that it finds for a frame unless it successfully constructs the caller frame. This means that the windows_frame_info field of the last frame on the stack is left unset, even when that frame does have windows unwinding information. This is not user-visible behavior, so it doesn't matter, but it is a blemish on the interface, and unit tests (added in a later patch) expect it. This patch saves the information in the frame as soon as we find it. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@508 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Fix function and public symbol lookup.jimblandy2010-01-283-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In r480, I botched the change to make the comparisons that decide whether an address falls within a function's range safe from overflow. The original code said: address >= function_base && address < function_base + function_size which is fine unless the function abuts the end of the address space, in which case the addition overflows and you get a false negative. My change subtracted function_size from both sides of the latter comparison, which is meaning-preserving in true math, and gets you: address >= function_base && address - function_size < function_base This not only reads strangely, but also still overflows if function_size is greater than address. That's rare, but I've added a case to the unit tests that checks it. My intent had been to replace the addition which could overflow with a subtraction that was known not to overflow, namely: address >= function_base && address - function_base < function_size This is equivalent to the original in true math, and because of the first comparison, we know the subtraction won't underflow in MemAddr math. The patch includes similar fixes to the public symbol lookup code, and to FindWindowsFrameInfo, which was the only other function affected by r480. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@503 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Have RetrieveNearestRange correctly return range extent.jimblandy2010-01-272-2/+19
| | | | | | | | | | RangeMaps use the range's upper end as the key in the underlying map, but RetrieveNearestRange was treating the key as the lower end. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@501 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Don't pass Windows stack walking information to all walkers.jimblandy2010-01-1411-60/+36
| | | | | | | | | | | | | | | | | | | | | At the moment, the StackWalker GetCallerFrame member function expects a vector of WindowsFrameInfo structures, even though WindowsFrameInfo is only used or useful on one one implementation (StackWalkerX86). This patch changes StackWalker::GetCallerFrame to no longer expect the WindowsFrameInfo structures, and changes all implementations to match. In particular, StackWalkerX86 is changed to find the WindowsFrameInfo data itself, and store a pointer to whatever it got in the StackFrame object itself (which is really a StackFrameX86). To allow GetCallerFrame implementations to look up stack walking data, StackWalker::resolver_ needs to be made protected, not private. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@491 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Opening a map file is not an error.jimblandy2010-01-131-1/+1
| | | | | | | a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@485 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Avoid warnings building with G++ 4.4.1 using -O3 -Wall.jimblandy2010-01-123-4/+2
| | | | | | | | | | | 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 49013: Breakpad Processor: Use a separate API to retrieve Windows ↵jimblandy2010-01-113-74/+89
| | | | | | | | | | | | | | | | | | | | stack debugging info. At the moment, FillSourceLineInfo returns Windows DIA-based stack walking data. In addition to being ugly, this makes it difficult to provide access to DWARF CFI-based stack walking data in a symmetrical way. This patch changes FillSourceLineInfo to do the single job its name suggests, and adds a second member function to SourceLineResolverInterface to retrieve Windows DIA stack walking information. A sibling member function will provide access to DWARF CFI stack walking data. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@480 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 49012: Breakpad Processor: Rename 'StackFrameInfo' structure to ↵jimblandy2009-12-2314-47/+47
| | | | | | | | | | | | | | | 'WindowsFrameInfo'. Also, rename stack_frame_info.h to windows_frame_info.h. If it seems odd to have functions like FillSourceLineInfo returning Windows-specific data structures... well, it is! This patch just makes it more obvious what's going on. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@471 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad processor: Use unsigned constants in comparisons, to quiet compiler ↵jimblandy2009-12-233-12/+12
| | | | | | | | | | | | warnings. This patch avoids comparisons between signed and unsigned values, as warned about by G++ 4.4.1. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@469 4c0a9323-5329-0410-9bdc-e9ce6186880e
* fix a badly-applied patch, and also re-run automake which I forgot to doted.mielczarek2009-12-211-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@455 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Basic arm cpu support for processor. r=mark at http://breakpad.appspot.com/49011ted.mielczarek2009-12-195-2/+298
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@454 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Added on-demand minidump generation for Linux, and a Linux test app.brdevmn2009-12-161-0/+81
| | | | | | | | | | | A=brdevmn R=mochalatte Code review: http://breakpad.appspot.com/48001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@451 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow Minidump class to be instantiated with stream instead of file. r=mark ↵ted.mielczarek2009-12-092-28/+151
| | | | | | at http://breakpad.appspot.com/46001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@438 4c0a9323-5329-0410-9bdc-e9ce6186880e
* issue 170 - Report assertion type in minidump_stackwalk output. r=mark at ↵ted.mielczarek2009-12-025-1/+196
| | | | | | http://breakpad.appspot.com/45001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@433 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix when walking stack when no module list is present and the return address ↵nealsid2009-10-301-1/+1
| | | | | | | | | | | | | | | has to be scanned. http://breakpad.appspot.com/36002 R=doshimun A=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@420 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fixed style errorjschuh@chromium.org2009-10-191-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@419 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 35001: Fallback to Thread Context on bad Exception Contextjschuh@chromium.org2009-10-192-5/+10
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@418 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Raise minidump processing limitsnealsid2009-10-141-4/+4
| | | | | | | | | A=justin schuh R=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@416 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Let x86 stackwalker scan stack in cases where program evaluation fails. ↵ted.mielczarek2009-10-085-26/+129
| | | | | | 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
* Issue 328 - should have constant for VC++ exceptions, and stringify in ↵ted.mielczarek2009-09-041-0/+3
| | | | | | | | | | MinidumpProcessor::GetCrashReason r=nealsid at http://breakpad.appspot.com/25001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@394 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Don't use the deprecated __gnu_cxx::hash_map container.jimblandy@gmail.com2009-09-031-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Modern GNU compilers warn about the #inclusion of <ext/hash_map>; that container is deprecated, and code should use <tr1/unordered_map> instead. However, to stay within the boundaries of C++ '98, it's probably fine just to use plain old std::map. Breakpad uses hash_map in three cases: o The DWARF reader's SectionMap type maps object file section names to data. This map is consulted once per section kind per DWARF compilation unit; it is not performance-critical. o The Mac dump_syms tool uses it to map machine architectures to section maps in Universal binaries. It's hard to imagine there ever being more than two entries in such a map. o The processor's BasicSourceLineResolver uses a hash_map to map file numbers to file names. This is the map that will probably have the most entries, but it's only accessed once per frame, after we've found the frame's line entry. a=jimblandy r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@393 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix build errors with gcc 4.4. Patch by Silvius Rus <rus@google.com>.mmentovai2009-08-143-0/+4
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@383 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add stack-dumping logic to crash_report with -t switchnealsid2009-07-021-0/+1
| | | | | | | | | R=jeremy A=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@357 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Removed logging init macro from minidump_processor_unittest, since with the ↵nealsid2009-05-291-1/+0
| | | | | | Google Test integration, logging is handled through it's facilities git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@345 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add more error information to minidump processing return code. Also added ↵nealsid2009-05-293-106/+149
| | | | | | | | | | | 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
* Fix memory leak in test case when calling into basic source line resolver.nealsid2009-05-141-2/+6
| | | | | | | | | R=brdevmn A=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@338 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix memory leak when using the basic source line resolver, plus the ↵nealsid2009-04-221-9/+11
| | | | | | | | | | | optimization to load using in-memory buffers. Moved from manually allocating/deallocating memory to using a scoped_array A=nealsid R=tiger feng git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@329 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix for issues 296, 297. Various symbol supplier classes need to be updated ↵nealsid2009-02-274-7/+57
| | | | | | with new overload('make check' was failing, as well as crash_report), and remove logging that was flooding output git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@318 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Modify symbol supplier interface to support an overload that takes a symbol ↵nealsid2009-02-194-37/+144
| | | | | | | | | | data buffer, to get around an extraneous read/write of symbol data R=doshimun git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@311 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Include what you use: include <algorithm> and <string.h> as needed. Patch bymmentovai2008-09-152-0/+2
| | | | | | | Robert Henry. r=me git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@284 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix newlines (#253). rs=ted.mielczarekmmentovai2008-04-071-22151/+22151
| | | | | | | http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/7e62a299ce3fa222 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@255 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Processor crashes on some truncated minidumps after #222. r=ted.mielczarekmmentovai2008-04-041-6/+11
| | | | | | | http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/a451668b1ece259f git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@254 4c0a9323-5329-0410-9bdc-e9ce6186880e
* issue 223 - Fixes for SOlaris handler during integration with Firefox. patch ↵ted.mielczarek2008-03-181-0/+4
| | | | | | by Alfred Peng, r=mento,me git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@250 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-254-83/+85
| | | | | | | 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
* Remove dependency on ole32 on Windows (#132). Patch by Sorin Jianu ↵mmentovai2008-01-281-2/+1
| | | | | | <sorinj>, r=me. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@237 4c0a9323-5329-0410-9bdc-e9ce6186880e