diff options
author | Ted Mielczarek <ted@mielczarek.org> | 2016-06-10 13:23:29 -0400 |
---|---|---|
committer | Ted Mielczarek <ted@mielczarek.org> | 2016-06-10 13:23:29 -0400 |
commit | c44217f6468152bf5693df7ec78a48d97e2b0e83 (patch) | |
tree | f05595f7a39b34c8111c6a74bfbf505c66dfa4b1 /src/common/module.cc | |
parent | Fix a trivial parsing bug caught by static analysis (diff) | |
download | breakpad-c44217f6468152bf5693df7ec78a48d97e2b0e83.tar.xz |
Dump INFO CODE_ID containing Build ID in Linux dump_syms
I'd like to have the Build ID available for our symbol server
uploading, and this will make it easy.
Most of this change is me rewriting dump_symbols_unittest to be
typed tests so I could add a new test there.
R=mark@chromium.org
BUG=
Review URL: https://codereview.chromium.org/2052263002 .
Diffstat (limited to 'src/common/module.cc')
-rw-r--r-- | src/common/module.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/module.cc b/src/common/module.cc index fa798f48..b5fcb623 100644 --- a/src/common/module.cc +++ b/src/common/module.cc @@ -49,11 +49,13 @@ using std::hex; Module::Module(const string &name, const string &os, - const string &architecture, const string &id) : + const string &architecture, const string &id, + const string &code_id /* = "" */) : name_(name), os_(os), architecture_(architecture), id_(id), + code_id_(code_id), load_address_(0) { } Module::~Module() { @@ -235,6 +237,10 @@ bool Module::Write(std::ostream &stream, SymbolData symbol_data) { if (!stream.good()) return ReportError(); + if (!code_id_.empty()) { + stream << "INFO CODE_ID " << code_id_ << endl; + } + if (symbol_data != ONLY_CFI) { AssignSourceIds(); |