Populate stack frames with unloaded module info.

This CL hits lots of source files because:
 1. An update to the CodeModule virtual class. I added an is_loaded
  method to specify whether the module is loaded. There were several
  mocks/test classes that needed to be updated with an implementation.
  An alternative to this route would be to modify
  MinidumpUnloadedModule::code_file to prepend "Unloaded_" to the
  module name.

 2. Added an unloaded_modules parameter to
  StackFrameSymbolizer::FillSourceLineInfo.

BUG=

Change-Id: Ic9c7f7c7b7e932a154a5d4ccf292c1527d8da09f
Reviewed-on: https://chromium-review.googlesource.com/430241
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
This commit is contained in:
Joshua Peraza 2017-01-19 11:18:41 -08:00
parent e7dfafc16e
commit 0924d424e4
15 changed files with 161 additions and 13 deletions

View file

@ -62,14 +62,16 @@ class BasicCodeModule : public CodeModule {
code_identifier_(that->code_identifier()),
debug_file_(that->debug_file()),
debug_identifier_(that->debug_identifier()),
version_(that->version()) {}
version_(that->version()),
is_unloaded_(that->is_unloaded()) {}
BasicCodeModule(uint64_t base_address, uint64_t size,
const string &code_file,
const string &code_identifier,
const string &debug_file,
const string &debug_identifier,
const string &version)
const string &version,
const bool is_unloaded = false)
: base_address_(base_address),
size_(size),
shrink_down_delta_(0),
@ -77,7 +79,8 @@ class BasicCodeModule : public CodeModule {
code_identifier_(code_identifier),
debug_file_(debug_file),
debug_identifier_(debug_identifier),
version_(version)
version_(version),
is_unloaded_(is_unloaded)
{}
virtual ~BasicCodeModule() {}
@ -95,6 +98,7 @@ class BasicCodeModule : public CodeModule {
virtual string debug_identifier() const { return debug_identifier_; }
virtual string version() const { return version_; }
virtual CodeModule* Copy() const { return new BasicCodeModule(this); }
virtual bool is_unloaded() const { return is_unloaded_; }
private:
uint64_t base_address_;
@ -105,6 +109,7 @@ class BasicCodeModule : public CodeModule {
string debug_file_;
string debug_identifier_;
string version_;
bool is_unloaded_;
// Disallow copy constructor and assignment operator.
BasicCodeModule(const BasicCodeModule &that);