diff options
author | SiyangXie@gmail.com <SiyangXie@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-10-10 21:41:52 +0000 |
---|---|---|
committer | SiyangXie@gmail.com <SiyangXie@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-10-10 21:41:52 +0000 |
commit | bab770045bb2cdedce4046400544904fc40c6703 (patch) | |
tree | 48e0bf03581bbe0d393746a9051d564ae9e29c53 /src/google_breakpad/processor/minidump_processor.h | |
parent | Make Linux signal handler more robust. (diff) | |
download | breakpad-bab770045bb2cdedce4046400544904fc40c6703.tar.xz |
Refactor the logic of resolving source line info into helper class.
http://breakpad.appspot.com/459002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1068 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/google_breakpad/processor/minidump_processor.h')
-rw-r--r-- | src/google_breakpad/processor/minidump_processor.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/google_breakpad/processor/minidump_processor.h b/src/google_breakpad/processor/minidump_processor.h index 216e9728..5da11cd3 100644 --- a/src/google_breakpad/processor/minidump_processor.h +++ b/src/google_breakpad/processor/minidump_processor.h @@ -40,6 +40,7 @@ namespace google_breakpad { class Minidump; class ProcessState; +class StackFrameSymbolizer; class SourceLineResolverInterface; class SymbolSupplier; struct SystemInfo; @@ -92,37 +93,44 @@ class MinidumpProcessor { public: // Initializes this MinidumpProcessor. supplier should be an // implementation of the SymbolSupplier abstract base class. - MinidumpProcessor(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); + MinidumpProcessor(SymbolSupplier* supplier, + SourceLineResolverInterface* resolver); // Initializes the MinidumpProcessor with the option of // enabling the exploitability framework to analyze dumps // for probable security relevance. - MinidumpProcessor(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver, + MinidumpProcessor(SymbolSupplier* supplier, + SourceLineResolverInterface* resolver, + bool enable_exploitability); + + // Initializes the MinidumpProcessor with source line resolver helper, and + // the option of enabling the exploitability framework to analyze dumps + // for probable security relevance. + // Does not take ownership of resolver_helper, which must NOT be NULL. + MinidumpProcessor(StackFrameSymbolizer* stack_frame_symbolizer, bool enable_exploitability); ~MinidumpProcessor(); // Processes the minidump file and fills process_state with the result. ProcessResult Process(const string &minidump_file, - ProcessState *process_state); + ProcessState* process_state); // Processes the minidump structure and fills process_state with the // result. - ProcessResult Process(Minidump *minidump, - ProcessState *process_state); + ProcessResult Process(Minidump* minidump, + ProcessState* process_state); // Populates the cpu_* fields of the |info| parameter with textual // representations of the CPU type that the minidump in |dump| was // produced on. Returns false if this information is not available in // the minidump. - static bool GetCPUInfo(Minidump *dump, SystemInfo *info); + static bool GetCPUInfo(Minidump* dump, SystemInfo* info); // Populates the os_* fields of the |info| parameter with textual // representations of the operating system that the minidump in |dump| // was produced on. Returns false if this information is not available in // the minidump. - static bool GetOSInfo(Minidump *dump, SystemInfo *info); + static bool GetOSInfo(Minidump* dump, SystemInfo* info); // Returns a textual representation of the reason that a crash occurred, // if the minidump in dump was produced as a result of a crash. Returns @@ -132,7 +140,7 @@ class MinidumpProcessor { // address when the crash was caused by problems such as illegal // instructions or divisions by zero, or a data address when the crash // was caused by a memory access violation. - static string GetCrashReason(Minidump *dump, u_int64_t *address); + static string GetCrashReason(Minidump* dump, u_int64_t* address); // This function returns true if the passed-in error code is // something unrecoverable(i.e. retry should not happen). For @@ -152,11 +160,12 @@ class MinidumpProcessor { // Returns a textual representation of an assertion included // in the minidump. Returns an empty string if this information // does not exist or cannot be determined. - static string GetAssertion(Minidump *dump); + static string GetAssertion(Minidump* dump); private: - SymbolSupplier *supplier_; - SourceLineResolverInterface *resolver_; + StackFrameSymbolizer* frame_symbolizer_; + // Indicate whether resolver_helper_ is owned by this instance. + bool own_frame_symbolizer_; // This flag enables the exploitability scanner which attempts to // guess how likely it is that the crash represents an exploitable |