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
This commit is contained in:
mmentovai 2007-01-10 22:47:56 +00:00
parent 0ec76c7fad
commit 97d392dc4b
21 changed files with 308 additions and 127 deletions

View file

@ -54,6 +54,7 @@ class SourceLineResolverInterface;
struct StackFrame;
struct StackFrameInfo;
class SymbolSupplier;
class SystemInfo;
using std::vector;
@ -71,13 +72,15 @@ class Stackwalker {
// Returns a new concrete subclass suitable for the CPU that a stack was
// generated on, according to the CPU type indicated by the context
// argument. If no suitable concrete subclass exists, returns NULL.
static Stackwalker* StackwalkerForCPU(MinidumpContext *context,
static Stackwalker* StackwalkerForCPU(const SystemInfo *system_info,
MinidumpContext *context,
MemoryRegion *memory,
const CodeModules *modules,
SymbolSupplier *supplier,
SourceLineResolverInterface *resolver);
protected:
// system_info identifies the operating system, NULL or empty if unknown.
// memory identifies a MemoryRegion that provides the stack memory
// for the stack to walk. modules, if non-NULL, is a CodeModules
// object that is used to look up which code module each stack frame is
@ -86,11 +89,16 @@ class Stackwalker {
// resolved. resolver is an instance of SourceLineResolverInterface
// (see source_line_resolver_interface.h and basic_source_line_resolver.h).
// If resolver is NULL, source line info will not be resolved.
Stackwalker(MemoryRegion *memory,
Stackwalker(const SystemInfo *system_info,
MemoryRegion *memory,
const CodeModules *modules,
SymbolSupplier *supplier,
SourceLineResolverInterface *resolver);
// Information about the system that produced the minidump. Subclasses
// and the SymbolSupplier may find this information useful.
const SystemInfo *system_info_;
// The stack memory to walk. Subclasses will require this region to
// get information from the stack.
MemoryRegion *memory_;