aboutsummaryrefslogtreecommitdiff
path: root/src/google_breakpad
diff options
context:
space:
mode:
Diffstat (limited to 'src/google_breakpad')
-rw-r--r--src/google_breakpad/processor/code_module.h3
-rw-r--r--src/google_breakpad/processor/minidump.h2
-rw-r--r--src/google_breakpad/processor/process_state.h7
-rw-r--r--src/google_breakpad/processor/stack_frame_symbolizer.h8
-rw-r--r--src/google_breakpad/processor/stackwalker.h7
5 files changed, 23 insertions, 4 deletions
diff --git a/src/google_breakpad/processor/code_module.h b/src/google_breakpad/processor/code_module.h
index b139907c..29b8d9c9 100644
--- a/src/google_breakpad/processor/code_module.h
+++ b/src/google_breakpad/processor/code_module.h
@@ -94,6 +94,9 @@ class CodeModule {
// should always reflect the original values (reported in the minidump).
virtual uint64_t shrink_down_delta() const = 0;
virtual void SetShrinkDownDelta(uint64_t shrink_down_delta) = 0;
+
+ // Whether the module was unloaded from memory.
+ virtual bool is_unloaded() const = 0;
};
} // namespace google_breakpad
diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h
index 1bfc7d9e..bff38bf3 100644
--- a/src/google_breakpad/processor/minidump.h
+++ b/src/google_breakpad/processor/minidump.h
@@ -399,6 +399,7 @@ class MinidumpModule : public MinidumpObject,
virtual string debug_identifier() const;
virtual string version() const;
virtual CodeModule* Copy() const;
+ virtual bool is_unloaded() const { return false; }
// Getter and setter for shrink_down_delta. This is used when the address
// range for a module is shrunk down due to address range conflicts with
@@ -775,6 +776,7 @@ class MinidumpUnloadedModule : public MinidumpObject,
string debug_identifier() const override;
string version() const override;
CodeModule* Copy() const override;
+ bool is_unloaded() const override { return true; }
uint64_t shrink_down_delta() const override;
void SetShrinkDownDelta(uint64_t shrink_down_delta) override;
diff --git a/src/google_breakpad/processor/process_state.h b/src/google_breakpad/processor/process_state.h
index 9f12b0c6..21bef42c 100644
--- a/src/google_breakpad/processor/process_state.h
+++ b/src/google_breakpad/processor/process_state.h
@@ -91,7 +91,7 @@ enum ExploitabilityRating {
class ProcessState {
public:
- ProcessState() : modules_(NULL) { Clear(); }
+ ProcessState() : modules_(NULL), unloaded_modules_(NULL) { Clear(); }
~ProcessState();
// Resets the ProcessState to its default values
@@ -111,6 +111,7 @@ class ProcessState {
}
const SystemInfo* system_info() const { return &system_info_; }
const CodeModules* modules() const { return modules_; }
+ const CodeModules* unloaded_modules() const { return unloaded_modules_; }
const vector<linked_ptr<const CodeModule> >* shrunk_range_modules() const {
return &shrunk_range_modules_;
}
@@ -177,6 +178,10 @@ class ProcessState {
// ProcessState.
const CodeModules *modules_;
+ // The modules that have been unloaded from the process represented by the
+ // ProcessState.
+ const CodeModules *unloaded_modules_;
+
// The modules which virtual address ranges were shrunk down due to
// virtual address conflicts.
vector<linked_ptr<const CodeModule> > shrunk_range_modules_;
diff --git a/src/google_breakpad/processor/stack_frame_symbolizer.h b/src/google_breakpad/processor/stack_frame_symbolizer.h
index 074907cb..0bbaae0a 100644
--- a/src/google_breakpad/processor/stack_frame_symbolizer.h
+++ b/src/google_breakpad/processor/stack_frame_symbolizer.h
@@ -75,9 +75,11 @@ class StackFrameSymbolizer {
// Encapsulate the step of resolving source line info for a stack frame.
// "frame" must not be NULL.
- virtual SymbolizerResult FillSourceLineInfo(const CodeModules* modules,
- const SystemInfo* system_info,
- StackFrame* stack_frame);
+ virtual SymbolizerResult FillSourceLineInfo(
+ const CodeModules* modules,
+ const CodeModules* unloaded_modules,
+ const SystemInfo* system_info,
+ StackFrame* stack_frame);
virtual WindowsFrameInfo* FindWindowsFrameInfo(const StackFrame* frame);
diff --git a/src/google_breakpad/processor/stackwalker.h b/src/google_breakpad/processor/stackwalker.h
index a1bd3e7f..4378f75b 100644
--- a/src/google_breakpad/processor/stackwalker.h
+++ b/src/google_breakpad/processor/stackwalker.h
@@ -89,8 +89,10 @@ class Stackwalker {
DumpContext* context,
MemoryRegion* memory,
const CodeModules* modules,
+ const CodeModules* unloaded_modules,
StackFrameSymbolizer* resolver_helper);
+
static void set_max_frames(uint32_t max_frames) {
max_frames_ = max_frames;
max_frames_set_ = true;
@@ -189,6 +191,11 @@ class Stackwalker {
// This field is optional and may be NULL.
const CodeModules* modules_;
+ // A list of unloaded modules, for populating frames which aren't matched
+ // to any loaded modules.
+ // This field is optional and may be NULL.
+ const CodeModules* unloaded_modules_;
+
protected:
// The StackFrameSymbolizer implementation.
StackFrameSymbolizer* frame_symbolizer_;