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
This commit is contained in:
mmentovai 2006-12-05 22:52:28 +00:00
parent ed61ae0bbd
commit db3342a10e
36 changed files with 1515 additions and 351 deletions

View file

@ -43,6 +43,7 @@ using std::string;
using std::vector;
class CallStack;
class CodeModules;
class ProcessState {
public:
@ -58,6 +59,7 @@ class ProcessState {
string os_version() const { return os_version_; }
string cpu() const { return cpu_; }
string cpu_info() const { return cpu_info_; }
const CodeModules* modules() const { return modules_; }
private:
// MinidumpProcessor is responsible for building ProcessState objects.
@ -66,7 +68,7 @@ class ProcessState {
// Disallow instantiation other than by friends.
ProcessState() : crashed_(false), crash_reason_(), crash_address_(0),
requesting_thread_(-1), threads_(), os_(), os_version_(),
cpu_(), cpu_info_() {}
cpu_(), cpu_info_(), modules_(NULL) {}
// True if the process crashed, false if the dump was produced outside
// of an exception handler.
@ -120,6 +122,10 @@ class ProcessState {
// present in the dump, or additional identifying information is not
// defined for the CPU family, this field will be empty.
string cpu_info_;
// The modules that were loaded into the process represented by the
// ProcessState.
const CodeModules *modules_;
};
} // namespace google_airbag