Commit Graph

44 Commits

Author SHA1 Message Date
jimblandy
865df5af57 Breakpad test support: Move test_assembler.{h,cc} from src/processor to 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
2010-04-27 19:17:59 +00:00
ted.mielczarek
b223627d81 provide a network source line resolver + server. r=mark,jimb at http://breakpad.appspot.com/36001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@569 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-08 23:06:23 +00:00
jimblandy
e7e1e1ebf5 Breakpad processor: Support AMD64 stack unwinding driven by DWARF CFI.
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
2010-03-16 16:49:53 +00:00
jimblandy
c609f474a9 Breakpad: Support DWARF CFI-driven stack walking on ARM.
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
2010-03-16 16:46:22 +00:00
jimblandy
6d3a825dbf Breakpad: Add minidump processor support for DWARF Call Frame Information.
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
2010-03-16 16:28:32 +00:00
jimblandy
a7eb2329de Breakpad processor: Unit tests for StackwalkerX86.
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
2010-03-16 16:25:30 +00:00
jimblandy
9244496c6f Breakpad Processor: Add new unit tests for google_breakpad::Minidump
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
2010-03-16 16:20:34 +00:00
nealsid
de545c09d0 ARM support, with some build system changes to support x86-64, arm, and i386 in an autoconf style build in Linux. The O2 build for the unit tests is still broken but I'm checking this in to unblock people
A=nealsid
R=ajwong, hannahtang, ted.mielczarek



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@541 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-02 00:39:48 +00:00
jimblandy
b64d76a3b8 Issue 49012: Breakpad Processor: Rename 'StackFrameInfo' structure to '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
2009-12-23 22:32:14 +00:00
ted.mielczarek
9276b0d301 Basic arm cpu support for processor. r=mark at http://breakpad.appspot.com/49011
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@454 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-19 21:43:53 +00:00
ted.mielczarek
0cbd50c975 Allow Minidump class to be instantiated with stream instead of file. r=mark at http://breakpad.appspot.com/46001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@438 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-09 01:24:37 +00:00
nealsid
b56cfa067a Add more error information to minidump processing return code. Also added 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
2009-05-29 00:53:02 +00:00
ted.mielczarek
8eb7111814 Issue 196 - Breakpad processor support for x86-64. r=mento
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@227 4c0a9323-5329-0410-9bdc-e9ce6186880e
2007-10-31 19:20:31 +00:00
mmentovai
68004c84d6 Solaris version of symbol dumper (#207). Patch by Alfred Peng. r=me
http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/e4cbdbf7ddaf7f51


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@218 4c0a9323-5329-0410-9bdc-e9ce6186880e
2007-09-28 18:14:48 +00:00
mmentovai
13f0b2666b Update EXTRA_DIST for packaging.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@216 4c0a9323-5329-0410-9bdc-e9ce6186880e
2007-09-26 18:37:39 +00:00
mmentovai
ea2bba9706 Add SPARC/Solaris support to client handler and processor (#201, 200).
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
2007-09-26 18:28:05 +00:00
mmentovai
2e0e2234b9 Allow building with -pedantic (#186). r=ted.mielczarek
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
2007-05-31 19:44:52 +00:00
mmentovai
65571f17ed Add logging to minidump processor (#82). Part 2: add messages to the rest of
the processor.  r=ted.mielczarek

http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/cf56b767383a5d4b


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@172 4c0a9323-5329-0410-9bdc-e9ce6186880e
2007-05-21 20:09:33 +00:00
mmentovai
af3c43f00e Add logging to minidump processor (#82). First part: logging infrastructure
and messages for minidump.cc and minidump_processor.cc.  r=bryner.

http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/b056994d675f623c


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@169 4c0a9323-5329-0410-9bdc-e9ce6186880e
2007-05-17 18:34:37 +00:00
mmentovai
e5dc60822e Rename Airbag to Breakpad.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@122 4c0a9323-5329-0410-9bdc-e9ce6186880e
2007-02-14 19:51:05 +00:00
mmentovai
d986a54f67 Add module list to machine-readable minidump_stackwalk output (#119).
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
2007-01-29 21:30:31 +00:00
mmentovai
97d392dc4b Communicate OS and CPU to SymbolSupplier (#107). r=bryner
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
2007-01-10 22:47:56 +00:00
bryner
fd38d48e6d Add an abstract interface to SourceLineResolver, and allow any implementation
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
2006-12-11 23:22:54 +00:00
mmentovai
db3342a10e Module API (#32). r=waylonis, bryner
- 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
2006-12-05 22:52:28 +00:00
mmentovai
fe82bf24a9 Move headers for exported interfaces into src/google_airbag (#51). r=bryner
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
2006-11-06 19:39:47 +00:00
mmentovai
c34850a202 minidump_stackwalk should use MinidumpProcessor (#64). r=bryner
- 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
2006-10-27 00:40:56 +00:00
mmentovai
e5468b8a49 MinidumpProcessor should process all threads (#35). r=bryner
- MinidumpProcessor now processes all threads and returns a new ProcessState
   object.  (Interface change.)
 - ProcessState contains a CallStack for each thread in the process, and
   additional information about whether the process crashed, which thread
   crashed, the reason for the crash, and identifying attributes for the
   OS and CPU.
 - MinidumpSystemInfo now contains a GetCPUVendor() method that returns the
   vendor information from CPUID 0 on x86 processors ("GenuineIntel").

http://groups.google.com/group/airbag-dev/browse_thread/thread/16dd2c981e3361ba


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@47 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-10-24 19:31:21 +00:00
mmentovai
2466d8e993 Replace auto_ptr with scoped_ptr (#56). r=bryner
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
2006-10-23 20:25:42 +00:00
mmentovai
2fc823f579 Add PUBLIC support to SourceLineResolver (resolve function names in Windows
system libraries) (#53)
StackFrame::function_base is not populated (#49)
r=bryner

http://groups.google.com/group/airbag-dev/browse_thread/thread/a17d35348e7027bb


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@43 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-10-20 19:50:01 +00:00
mmentovai
246f406828 Handle frame pointer omission, (#21), part 4 (final part!): FPO stackwalker.
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
2006-10-20 01:46:38 +00:00
mmentovai
fc1c78e60e Handle frame pointer omission (#21), part 3: SourceLineResolver and PDBSourceLineWriter changes. r=bryner.
- PDBSourceLineWriter (dump_syms) outputs stack frame debugging information
 - SourceLineResolver reads the new information and puts it into a
   new StackFrameInfo structure, which is stored in a ContainedRangeMap.
   FillSourceLineInfo passes the StackFrameInfo back to the caller.
 - The base Stackwalker makes StackFrameInfo data available to subclasses
   during stackwalking, but does not use this information directly itself.
   Stackwalkers may access stack_frame_info_ for enhanced stackwalking
   (this will be part 4).
 - New test data for the updated dumped-symbol format

http://groups.google.com/group/airbag-dev/browse_thread/thread/735f191c9a1a1de4


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@38 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-09-28 21:09:37 +00:00
mmentovai
0dbedc973d Better testing for Stackwalker (#18). r=bryner
- Test StackwalkerX86 and StackwalkerPPC on the current process, if built
   by a supported compiler (gcc) on a supported (walkable) CPU (x86, ppc).
 - This test is not enabled by default because of certain optimizations
   that interfere with it (stack frame reuse, frame pointer omission).  See
   the comments at the top of stackwalker_selftest.cc.  To enable this
   test in the standard "make check" suite, configure with --enable-selftest.

http://groups.google.com/group/airbag-dev/browse_thread/thread/2ca1c8e72c809bec


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@35 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-09-25 21:16:15 +00:00
mmentovai
960e5277ee ppc stackwalker (#30). r=bryner
- 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
2006-09-25 18:29:48 +00:00
mmentovai
b934bb974a Handle frame pointer omission (#21), part 2: PostfixEvaluator. r=bryner.
- A postfix (reverse-Polish) notation expression evaluator that we can
   feed stack-frame debug information into, crank, and get pointers to
   the calling frame from.

http://groups.google.com/group/airbag-dev/browse_thread/thread/a1d6c5d1fd5fdcb9


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@32 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-09-22 00:42:23 +00:00
mmentovai
7daf246e4b Relicense to BSD (#29). r=bryner
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
2006-09-20 21:16:16 +00:00
mmentovai
8c2a4def4e Handle frame pointer omission (#21), part 1: ContainedRangeMap. r=bryner.
- ContainedRangeMap is the data structure that will be used to store and
   look up debugging information for frames by instruction address.  The
   debugging information includes a way to locate the calling frame in
   the absence of a saved frame pointer.
 - Restructure RangeMap into an -inl file to match ContainedRangeMap.

http://groups.google.com/group/airbag-dev/browse_thread/thread/c5823bfc1828ed42


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@29 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-09-20 16:20:15 +00:00
bryner
cce3492afc Get rid of CrashReport, and rename CrashReportProcessor to MinidumpProcessor
(#26) r=mmentovai.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@26 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-09-19 21:58:41 +00:00
mmentovai
cb9fd5b773 Make SourceLineResolver use RangeMap (#13). r=bryner
- Eliminate MemAddrMap from source_line_resolver.cc and adapt it to use
   RangeMap, also used by minidump.cc.
 - RangeMap operates on both a base address and a size, where MemAddrMap
   only used a base address, so the dumped symbol file format is modified
   to include size information.  dump_syms produces these files and
   SourceLineResolver consumes them.
 - Provide updated test data conforming to the new dumped symbol format.

http://groups.google.com/group/airbag-dev/browse_thread/thread/e9403cf3ad6336a1


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@21 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-09-08 18:03:56 +00:00
bryner
d5e66382d1 Add support to the StackWalker for resolving symbols, using a
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
2006-09-08 02:35:53 +00:00
mmentovai
213800d30c Initial implementation of x86 stackwalker (#9). r=bryner
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@12 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-09-06 19:28:46 +00:00
mmentovai
3261e8b6ea Initial implementation of minidump reader (#6). r=bryner
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@11 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-09-06 02:56:44 +00:00
bryner
07f8ef56ac Change header paths and include guards to be relative to the "src" directory. r=mmentovai.
http://groups.google.com/group/airbag-dev/msg/cbe061dd563e9d17



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@10 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-09-05 19:42:57 +00:00
mmentovai
425d256321 Make build system less annoying (#8) r=bryner
- Place objects in the appropriate directories, instead of filling up
   the root directory.
 - Remove namespace macros, which made maintenance troublesome and which
   created a dependency on config.h in public headers
 - Skip useless Fortran checks at configure time


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@8 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-08-30 20:05:05 +00:00
bryner
cb91a2f879 Initial import, which includes the Windows client-side dump_syms tool, and
part of the server-side dump processor.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@4 4c0a9323-5329-0410-9bdc-e9ce6186880e
2006-08-25 21:14:45 +00:00