From b28be1254c0698cfd42a9abb910da3c94cf35a7f Mon Sep 17 00:00:00 2001 From: jimblandy Date: Wed, 5 May 2010 17:12:38 +0000 Subject: Breakpad Linux dumper: Rename DumpStabsHandler to StabsToModule. All the other classes which receive debugging data from some sort of parser and use it to populate a Module have names ending in "ToModule": DwarfCUToModule, DwarfCFIToModule. Also, DumpStabsHandler doesn't actually dump anything. This patch renames the DumpStabsHandler class to StabsToModule, which is more consistent and descriptive. a=jimblandy, r=thestig git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@584 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/dump_stabs.cc | 187 -------------------------------- src/common/dump_stabs.h | 140 ------------------------ src/common/dump_stabs_unittest.cc | 193 --------------------------------- src/common/linux/dump_symbols.cc | 8 +- src/common/stabs_to_module.cc | 187 ++++++++++++++++++++++++++++++++ src/common/stabs_to_module.h | 140 ++++++++++++++++++++++++ src/common/stabs_to_module_unittest.cc | 193 +++++++++++++++++++++++++++++++++ src/tools/linux/dump_syms/Makefile | 37 ++++--- 8 files changed, 543 insertions(+), 542 deletions(-) delete mode 100644 src/common/dump_stabs.cc delete mode 100644 src/common/dump_stabs.h delete mode 100644 src/common/dump_stabs_unittest.cc create mode 100644 src/common/stabs_to_module.cc create mode 100644 src/common/stabs_to_module.h create mode 100644 src/common/stabs_to_module_unittest.cc (limited to 'src') diff --git a/src/common/dump_stabs.cc b/src/common/dump_stabs.cc deleted file mode 100644 index e4ae1e1b..00000000 --- a/src/common/dump_stabs.cc +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dump_stabs.cc --- implement the DumpStabsHandler class. - -#include -#include - -#include -#include - -#include "common/dump_stabs.h" - -namespace google_breakpad { - -using std::string; - -// Demangle using abi call. -// Older GCC may not support it. -static string Demangle(const string &mangled) { - int status = 0; - char *demangled = abi::__cxa_demangle(mangled.c_str(), NULL, NULL, &status); - if (status == 0 && demangled != NULL) { - string str(demangled); - free(demangled); - return str; - } - return string(mangled); -} - -DumpStabsHandler::~DumpStabsHandler() { - // Free any functions we've accumulated but not added to the module. - for (vector::iterator func_it = functions_.begin(); - func_it != functions_.end(); func_it++) - delete *func_it; - // Free any function that we're currently within. - delete current_function_; -} - -bool DumpStabsHandler::StartCompilationUnit(const char *name, uint64_t address, - const char *build_directory) { - assert(!in_compilation_unit_); - in_compilation_unit_ = true; - current_source_file_name_ = name; - current_source_file_ = module_->FindFile(name); - comp_unit_base_address_ = address; - boundaries_.push_back(static_cast(address)); - return true; -} - -bool DumpStabsHandler::EndCompilationUnit(uint64_t address) { - assert(in_compilation_unit_); - in_compilation_unit_ = false; - comp_unit_base_address_ = 0; - current_source_file_ = NULL; - current_source_file_name_ = NULL; - if (address) - boundaries_.push_back(static_cast(address)); - return true; -} - -bool DumpStabsHandler::StartFunction(const string &name, - uint64_t address) { - assert(!current_function_); - Module::Function *f = new Module::Function; - f->name = Demangle(name); - f->address = address; - f->size = 0; // We compute this in DumpStabsHandler::Finalize(). - f->parameter_size = 0; // We don't provide this information. - current_function_ = f; - boundaries_.push_back(static_cast(address)); - return true; -} - -bool DumpStabsHandler::EndFunction(uint64_t address) { - assert(current_function_); - // Functions in this compilation unit should have address bigger - // than the compilation unit's starting address. There may be a lot - // of duplicated entries for functions in the STABS data; only one - // entry can meet this requirement. - // - // (I don't really understand the above comment; just bringing it - // along from the previous code, and leaving the behaivor unchanged. - // If you know the whole story, please patch this comment. --jimb) - if (current_function_->address >= comp_unit_base_address_) - functions_.push_back(current_function_); - else - delete current_function_; - current_function_ = NULL; - if (address) - boundaries_.push_back(static_cast(address)); - return true; -} - -bool DumpStabsHandler::Line(uint64_t address, const char *name, int number) { - assert(current_function_); - assert(current_source_file_); - if (name != current_source_file_name_) { - current_source_file_ = module_->FindFile(name); - current_source_file_name_ = name; - } - Module::Line line; - line.address = address; - line.size = 0; // We compute this in DumpStabsHandler::Finalize(). - line.file = current_source_file_; - line.number = number; - current_function_->lines.push_back(line); - return true; -} - -void DumpStabsHandler::Warning(const char *format, ...) { - va_list args; - va_start(args, format); - vfprintf(stderr, format, args); - va_end(args); -} - -void DumpStabsHandler::Finalize() { - // Sort our boundary list, so we can search it quickly. - sort(boundaries_.begin(), boundaries_.end()); - // Sort all functions by address, just for neatness. - sort(functions_.begin(), functions_.end(), - Module::Function::CompareByAddress); - for (vector::iterator func_it = functions_.begin(); - func_it != functions_.end(); - func_it++) { - Module::Function *f = *func_it; - // Compute the function f's size. - vector::iterator boundary - = std::upper_bound(boundaries_.begin(), boundaries_.end(), f->address); - if (boundary != boundaries_.end()) - f->size = *boundary - f->address; - else - // If this is the last function in the module, and the STABS - // reader was unable to give us its ending address, then assign - // it a bogus, very large value. This will happen at most once - // per module: since we've added all functions' addresses to the - // boundary table, only one can be the last. - f->size = kFallbackSize; - - // Compute sizes for each of the function f's lines --- if it has any. - if (!f->lines.empty()) { - stable_sort(f->lines.begin(), f->lines.end(), - Module::Line::CompareByAddress); - vector::iterator last_line = f->lines.end() - 1; - for (vector::iterator line_it = f->lines.begin(); - line_it != last_line; line_it++) - line_it[0].size = line_it[1].address - line_it[0].address; - // Compute the size of the last line from f's end address. - last_line->size = (f->address + f->size) - last_line->address; - } - } - // Now that everything has a size, add our functions to the module, and - // dispose of our private list. - module_->AddFunctions(functions_.begin(), functions_.end()); - functions_.clear(); -} - -} // namespace google_breakpad diff --git a/src/common/dump_stabs.h b/src/common/dump_stabs.h deleted file mode 100644 index 36d773e8..00000000 --- a/src/common/dump_stabs.h +++ /dev/null @@ -1,140 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dump_stabs.h: Define the DumpStabsHandler class, which receives -// STABS debugging information from a parser and adds it to a Breakpad -// symbol file. - -#ifndef COMMON_LINUX_DUMP_STABS_H__ -#define COMMON_LINUX_DUMP_STABS_H__ - -#include - -#include -#include - -#include "common/module.h" -#include "common/stabs_reader.h" - -namespace google_breakpad { - -using std::string; -using std::vector; - -// A DumpStabsHandler is a handler that receives parsed STABS -// debugging information from a StabsReader, and uses that to populate -// a Module. (All classes are in the google_breakpad namespace.) A -// Module represents the contents of a Breakpad symbol file, and knows -// how to write itself out as such. A DumpStabsHandler thus acts as -// the bridge between STABS and Breakpad data. -class DumpStabsHandler: public google_breakpad::StabsHandler { - public: - // Receive parsed debugging information from a StabsReader, and - // store it all in MODULE. - DumpStabsHandler(Module *module) : - module_(module), - in_compilation_unit_(false), - comp_unit_base_address_(0), - current_function_(NULL), - current_source_file_(NULL), - current_source_file_name_(NULL) { } - ~DumpStabsHandler(); - - // The standard StabsHandler virtual member functions. - bool StartCompilationUnit(const char *name, uint64_t address, - const char *build_directory); - bool EndCompilationUnit(uint64_t address); - bool StartFunction(const string &name, uint64_t address); - bool EndFunction(uint64_t address); - bool Line(uint64_t address, const char *name, int number); - void Warning(const char *format, ...); - - // Do any final processing necessary to make module_ contain all the - // data provided by the STABS reader. - // - // Because STABS does not provide reliable size information for - // functions and lines, we need to make a pass over the data after - // processing all the STABS to compute those sizes. We take care of - // that here. - void Finalize(); - - private: - - // An arbitrary, but very large, size to use for functions whose - // size we can't compute properly. - static const uint64_t kFallbackSize = 0x10000000; - - // The module we're contributing debugging info to. - Module *module_; - - // The functions we've generated so far. We don't add these to - // module_ as we parse them. Instead, we wait until we've computed - // their ending address, and their lines' ending addresses. - // - // We could just stick them in module_ from the outset, but if - // module_ already contains data gathered from other debugging - // formats, that would complicate the size computation. - vector functions_; - - // Boundary addresses. STABS doesn't necessarily supply sizes for - // functions and lines, so we need to compute them ourselves by - // finding the next object. - vector boundaries_; - - // True if we are currently within a compilation unit: we have gotten a - // StartCompilationUnit call, but no matching EndCompilationUnit call - // yet. We use this for sanity checks. - bool in_compilation_unit_; - - // The base address of the current compilation unit. We use this to - // recognize functions we should omit from the symbol file. (If you - // know the details of why we omit these, please patch this - // comment.) - Module::Address comp_unit_base_address_; - - // The function we're currently contributing lines to. - Module::Function *current_function_; - - // The last Module::File we got a line number in. - Module::File *current_source_file_; - - // The pointer in the .stabstr section of the name that - // current_source_file_ is built from. This allows us to quickly - // recognize when the current line is in the same file as the - // previous one (which it usually is). - const char *current_source_file_name_; -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_DUMP_STABS_H__ diff --git a/src/common/dump_stabs_unittest.cc b/src/common/dump_stabs_unittest.cc deleted file mode 100644 index 7d27cb88..00000000 --- a/src/common/dump_stabs_unittest.cc +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dump_stabs_unittest.cc: Unit tests for DumpStabsHandler. - -#include - -#include "breakpad_googletest_includes.h" -#include "common/dump_stabs.h" - -using google_breakpad::DumpStabsHandler; -using google_breakpad::Module; -using std::vector; - -TEST(DumpStabsHandler, SimpleCU) { - Module m("name", "os", "arch", "id"); - DumpStabsHandler h(&m); - - // Feed in a simple compilation unit that defines a function with - // one line. - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0x9f4d1271e50db93bLL, - "build-directory")); - EXPECT_TRUE(h.StartFunction("function", 0xfde4abbed390c394LL)); - EXPECT_TRUE(h.Line(0xfde4abbed390c394LL, "source-file-name", 174823314)); - EXPECT_TRUE(h.EndFunction(0xfde4abbed390c3a4LL)); - EXPECT_TRUE(h.EndCompilationUnit(0xfee4abbed390c3a4LL)); - h.Finalize(); - - // Now check to see what has been added to the Module. - Module::File *file = m.FindExistingFile("source-file-name"); - ASSERT_TRUE(file != NULL); - - vector functions; - m.GetFunctions(&functions, functions.end()); - ASSERT_EQ((size_t) 1, functions.size()); - Module::Function *function = functions[0]; - EXPECT_STREQ("function", function->name.c_str()); - EXPECT_EQ(0xfde4abbed390c394LL, function->address); - EXPECT_EQ(0x10U, function->size); - EXPECT_EQ(0U, function->parameter_size); - ASSERT_EQ((size_t) 1, function->lines.size()); - Module::Line *line = &function->lines[0]; - EXPECT_EQ(0xfde4abbed390c394LL, line->address); - EXPECT_EQ(0x10U, line->size); // derived from EndFunction - EXPECT_TRUE(line->file == file); - EXPECT_EQ(174823314, line->number); -} - -TEST(InferSizes, LineSize) { - Module m("name", "os", "arch", "id"); - DumpStabsHandler h(&m); - - // Feed in a simple compilation unit that defines a function with - // one line. - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0xb4513962eff94e92LL, - "build-directory")); - EXPECT_TRUE(h.StartFunction("function", 0xb4513962eff94e92LL)); - EXPECT_TRUE(h.Line(0xb4513962eff94e92LL, "source-file-name-1", 77396614)); - EXPECT_TRUE(h.Line(0xb4513963eff94e92LL, "source-file-name-2", 87660088)); - EXPECT_TRUE(h.EndFunction(0)); // unknown function end address - EXPECT_TRUE(h.EndCompilationUnit(0)); // unknown CU end address - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit-2", 0xb4523963eff94e92LL, - "build-directory-2")); // next boundary - EXPECT_TRUE(h.EndCompilationUnit(0)); - h.Finalize(); - - // Now check to see what has been added to the Module. - Module::File *file1 = m.FindExistingFile("source-file-name-1"); - ASSERT_TRUE(file1 != NULL); - Module::File *file2 = m.FindExistingFile("source-file-name-2"); - ASSERT_TRUE(file2 != NULL); - - vector functions; - m.GetFunctions(&functions, functions.end()); - ASSERT_EQ((size_t) 1, functions.size()); - - Module::Function *function = functions[0]; - EXPECT_STREQ("function", function->name.c_str()); - EXPECT_EQ(0xb4513962eff94e92LL, function->address); - EXPECT_EQ(0x1000100000000ULL, function->size); // inferred from CU end - EXPECT_EQ(0U, function->parameter_size); - ASSERT_EQ((size_t) 2, function->lines.size()); - - Module::Line *line1 = &function->lines[0]; - EXPECT_EQ(0xb4513962eff94e92LL, line1->address); - EXPECT_EQ(0x100000000ULL, line1->size); // derived from EndFunction - EXPECT_TRUE(line1->file == file1); - EXPECT_EQ(77396614, line1->number); - - Module::Line *line2 = &function->lines[1]; - EXPECT_EQ(0xb4513963eff94e92LL, line2->address); - EXPECT_EQ(0x1000000000000ULL, line2->size); // derived from EndFunction - EXPECT_TRUE(line2->file == file2); - EXPECT_EQ(87660088, line2->number); -} - -TEST(FunctionNames, Mangled) { - Module m("name", "os", "arch", "id"); - DumpStabsHandler h(&m); - - // Compilation unit with one function, mangled name. - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0xf2cfda63cef7f46cLL, - "build-directory")); - EXPECT_TRUE(h.StartFunction("_ZNSt6vectorIySaIyEE9push_backERKy", - 0xf2cfda63cef7f46dLL)); - EXPECT_TRUE(h.EndFunction(0)); - EXPECT_TRUE(h.EndCompilationUnit(0)); - - h.Finalize(); - - // Now check to see what has been added to the Module. - Module::File *file = m.FindExistingFile("compilation-unit"); - ASSERT_TRUE(file != NULL); - - vector functions; - m.GetFunctions(&functions, functions.end()); - ASSERT_EQ(1U, functions.size()); - - Module::Function *function = functions[0]; - // This is GCC-specific, but we shouldn't be seeing STABS data anywhere - // but Linux. - EXPECT_STREQ("std::vector >::" - "push_back(unsigned long long const&)", - function->name.c_str()); - EXPECT_EQ(0xf2cfda63cef7f46dLL, function->address); - EXPECT_LT(0U, function->size); // should have used dummy size - EXPECT_EQ(0U, function->parameter_size); - ASSERT_EQ(0U, function->lines.size()); -} - -// The GNU toolchain can omit functions that are not used; however, -// when it does so, it doesn't clean up the debugging information that -// refers to them. In STABS, this results in compilation units whose -// SO addresses are zero. -TEST(Omitted, Function) { - Module m("name", "os", "arch", "id"); - DumpStabsHandler h(&m); - - // The StartCompilationUnit and EndCompilationUnit calls may both have an - // address of zero if the compilation unit has had sections removed. - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0, "build-directory")); - EXPECT_TRUE(h.StartFunction("function", 0x2a133596)); - EXPECT_TRUE(h.EndFunction(0)); - EXPECT_TRUE(h.EndCompilationUnit(0)); -} - -// TODO --- if we actually cared about STABS. Even without these we've -// got full coverage of non-failure source lines in dump_stabs.cc. - -// Line size from next line -// Line size from function end -// Line size from next function start -// line size from cu end -// line size from next cu start -// fallback size is something plausible - -// function size from function end -// function size from next function start -// function size from cu end -// function size from next cu start -// fallback size is something plausible - -// omitting functions outside the compilation unit's address range -// zero-line, one-line, many-line functions diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc index da4263f7..ec689ec6 100644 --- a/src/common/linux/dump_symbols.cc +++ b/src/common/linux/dump_symbols.cc @@ -48,23 +48,23 @@ #include "common/dwarf/bytereader-inl.h" #include "common/dwarf/dwarf2diehandler.h" -#include "common/dump_stabs.h" -#include "common/linux/dump_symbols.h" #include "common/dwarf_cfi_to_module.h" #include "common/dwarf_cu_to_module.h" #include "common/dwarf_line_to_module.h" +#include "common/linux/dump_symbols.h" #include "common/linux/file_id.h" #include "common/module.h" #include "common/stabs_reader.h" +#include "common/stabs_to_module.h" // This namespace contains helper functions. namespace { -using google_breakpad::DumpStabsHandler; using google_breakpad::DwarfCFIToModule; using google_breakpad::DwarfCUToModule; using google_breakpad::DwarfLineToModule; using google_breakpad::Module; +using google_breakpad::StabsToModule; // Fix offset into virtual address by adding the mapped base into offsets. // Make life easier when want to find something by offset. @@ -139,7 +139,7 @@ static bool LoadStabs(const ElfW(Ehdr) *elf_header, return false; } // A callback object to handle data from the STABS reader. - DumpStabsHandler handler(module); + StabsToModule handler(module); // Find the addresses of the STABS data, and create a STABS reader object. // On Linux, STABS entries always have 32-bit values, regardless of the // address size of the architecture whose code they're describing. diff --git a/src/common/stabs_to_module.cc b/src/common/stabs_to_module.cc new file mode 100644 index 00000000..858d0dff --- /dev/null +++ b/src/common/stabs_to_module.cc @@ -0,0 +1,187 @@ +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Original author: Jim Blandy + +// dump_stabs.cc --- implement the StabsToModule class. + +#include +#include +#include + +#include + +#include "common/stabs_to_module.h" + +namespace google_breakpad { + +using std::string; + +// Demangle using abi call. +// Older GCC may not support it. +static string Demangle(const string &mangled) { + int status = 0; + char *demangled = abi::__cxa_demangle(mangled.c_str(), NULL, NULL, &status); + if (status == 0 && demangled != NULL) { + string str(demangled); + free(demangled); + return str; + } + return string(mangled); +} + +StabsToModule::~StabsToModule() { + // Free any functions we've accumulated but not added to the module. + for (vector::iterator func_it = functions_.begin(); + func_it != functions_.end(); func_it++) + delete *func_it; + // Free any function that we're currently within. + delete current_function_; +} + +bool StabsToModule::StartCompilationUnit(const char *name, uint64_t address, + const char *build_directory) { + assert(!in_compilation_unit_); + in_compilation_unit_ = true; + current_source_file_name_ = name; + current_source_file_ = module_->FindFile(name); + comp_unit_base_address_ = address; + boundaries_.push_back(static_cast(address)); + return true; +} + +bool StabsToModule::EndCompilationUnit(uint64_t address) { + assert(in_compilation_unit_); + in_compilation_unit_ = false; + comp_unit_base_address_ = 0; + current_source_file_ = NULL; + current_source_file_name_ = NULL; + if (address) + boundaries_.push_back(static_cast(address)); + return true; +} + +bool StabsToModule::StartFunction(const string &name, + uint64_t address) { + assert(!current_function_); + Module::Function *f = new Module::Function; + f->name = Demangle(name); + f->address = address; + f->size = 0; // We compute this in StabsToModule::Finalize(). + f->parameter_size = 0; // We don't provide this information. + current_function_ = f; + boundaries_.push_back(static_cast(address)); + return true; +} + +bool StabsToModule::EndFunction(uint64_t address) { + assert(current_function_); + // Functions in this compilation unit should have address bigger + // than the compilation unit's starting address. There may be a lot + // of duplicated entries for functions in the STABS data; only one + // entry can meet this requirement. + // + // (I don't really understand the above comment; just bringing it + // along from the previous code, and leaving the behaivor unchanged. + // If you know the whole story, please patch this comment. --jimb) + if (current_function_->address >= comp_unit_base_address_) + functions_.push_back(current_function_); + else + delete current_function_; + current_function_ = NULL; + if (address) + boundaries_.push_back(static_cast(address)); + return true; +} + +bool StabsToModule::Line(uint64_t address, const char *name, int number) { + assert(current_function_); + assert(current_source_file_); + if (name != current_source_file_name_) { + current_source_file_ = module_->FindFile(name); + current_source_file_name_ = name; + } + Module::Line line; + line.address = address; + line.size = 0; // We compute this in StabsToModule::Finalize(). + line.file = current_source_file_; + line.number = number; + current_function_->lines.push_back(line); + return true; +} + +void StabsToModule::Warning(const char *format, ...) { + va_list args; + va_start(args, format); + vfprintf(stderr, format, args); + va_end(args); +} + +void StabsToModule::Finalize() { + // Sort our boundary list, so we can search it quickly. + sort(boundaries_.begin(), boundaries_.end()); + // Sort all functions by address, just for neatness. + sort(functions_.begin(), functions_.end(), + Module::Function::CompareByAddress); + for (vector::iterator func_it = functions_.begin(); + func_it != functions_.end(); + func_it++) { + Module::Function *f = *func_it; + // Compute the function f's size. + vector::iterator boundary + = std::upper_bound(boundaries_.begin(), boundaries_.end(), f->address); + if (boundary != boundaries_.end()) + f->size = *boundary - f->address; + else + // If this is the last function in the module, and the STABS + // reader was unable to give us its ending address, then assign + // it a bogus, very large value. This will happen at most once + // per module: since we've added all functions' addresses to the + // boundary table, only one can be the last. + f->size = kFallbackSize; + + // Compute sizes for each of the function f's lines --- if it has any. + if (!f->lines.empty()) { + stable_sort(f->lines.begin(), f->lines.end(), + Module::Line::CompareByAddress); + vector::iterator last_line = f->lines.end() - 1; + for (vector::iterator line_it = f->lines.begin(); + line_it != last_line; line_it++) + line_it[0].size = line_it[1].address - line_it[0].address; + // Compute the size of the last line from f's end address. + last_line->size = (f->address + f->size) - last_line->address; + } + } + // Now that everything has a size, add our functions to the module, and + // dispose of our private list. + module_->AddFunctions(functions_.begin(), functions_.end()); + functions_.clear(); +} + +} // namespace google_breakpad diff --git a/src/common/stabs_to_module.h b/src/common/stabs_to_module.h new file mode 100644 index 00000000..6538d78d --- /dev/null +++ b/src/common/stabs_to_module.h @@ -0,0 +1,140 @@ +// -*- mode: C++ -*- + +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Original author: Jim Blandy + +// dump_stabs.h: Define the StabsToModule class, which receives +// STABS debugging information from a parser and adds it to a Breakpad +// symbol file. + +#ifndef COMMON_LINUX_DUMP_STABS_H__ +#define COMMON_LINUX_DUMP_STABS_H__ + +#include + +#include +#include + +#include "common/module.h" +#include "common/stabs_reader.h" + +namespace google_breakpad { + +using std::string; +using std::vector; + +// A StabsToModule is a handler that receives parsed STABS +// debugging information from a StabsReader, and uses that to populate +// a Module. (All classes are in the google_breakpad namespace.) A +// Module represents the contents of a Breakpad symbol file, and knows +// how to write itself out as such. A StabsToModule thus acts as +// the bridge between STABS and Breakpad data. +class StabsToModule: public google_breakpad::StabsHandler { + public: + // Receive parsed debugging information from a StabsReader, and + // store it all in MODULE. + StabsToModule(Module *module) : + module_(module), + in_compilation_unit_(false), + comp_unit_base_address_(0), + current_function_(NULL), + current_source_file_(NULL), + current_source_file_name_(NULL) { } + ~StabsToModule(); + + // The standard StabsHandler virtual member functions. + bool StartCompilationUnit(const char *name, uint64_t address, + const char *build_directory); + bool EndCompilationUnit(uint64_t address); + bool StartFunction(const string &name, uint64_t address); + bool EndFunction(uint64_t address); + bool Line(uint64_t address, const char *name, int number); + void Warning(const char *format, ...); + + // Do any final processing necessary to make module_ contain all the + // data provided by the STABS reader. + // + // Because STABS does not provide reliable size information for + // functions and lines, we need to make a pass over the data after + // processing all the STABS to compute those sizes. We take care of + // that here. + void Finalize(); + + private: + + // An arbitrary, but very large, size to use for functions whose + // size we can't compute properly. + static const uint64_t kFallbackSize = 0x10000000; + + // The module we're contributing debugging info to. + Module *module_; + + // The functions we've generated so far. We don't add these to + // module_ as we parse them. Instead, we wait until we've computed + // their ending address, and their lines' ending addresses. + // + // We could just stick them in module_ from the outset, but if + // module_ already contains data gathered from other debugging + // formats, that would complicate the size computation. + vector functions_; + + // Boundary addresses. STABS doesn't necessarily supply sizes for + // functions and lines, so we need to compute them ourselves by + // finding the next object. + vector boundaries_; + + // True if we are currently within a compilation unit: we have gotten a + // StartCompilationUnit call, but no matching EndCompilationUnit call + // yet. We use this for sanity checks. + bool in_compilation_unit_; + + // The base address of the current compilation unit. We use this to + // recognize functions we should omit from the symbol file. (If you + // know the details of why we omit these, please patch this + // comment.) + Module::Address comp_unit_base_address_; + + // The function we're currently contributing lines to. + Module::Function *current_function_; + + // The last Module::File we got a line number in. + Module::File *current_source_file_; + + // The pointer in the .stabstr section of the name that + // current_source_file_ is built from. This allows us to quickly + // recognize when the current line is in the same file as the + // previous one (which it usually is). + const char *current_source_file_name_; +}; + +} // namespace google_breakpad + +#endif // COMMON_LINUX_DUMP_STABS_H__ diff --git a/src/common/stabs_to_module_unittest.cc b/src/common/stabs_to_module_unittest.cc new file mode 100644 index 00000000..4248b3c0 --- /dev/null +++ b/src/common/stabs_to_module_unittest.cc @@ -0,0 +1,193 @@ +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Original author: Jim Blandy + +// dump_stabs_unittest.cc: Unit tests for StabsToModule. + +#include + +#include "breakpad_googletest_includes.h" +#include "common/stabs_to_module.h" + +using google_breakpad::Module; +using google_breakpad::StabsToModule; +using std::vector; + +TEST(StabsToModule, SimpleCU) { + Module m("name", "os", "arch", "id"); + StabsToModule h(&m); + + // Feed in a simple compilation unit that defines a function with + // one line. + EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0x9f4d1271e50db93bLL, + "build-directory")); + EXPECT_TRUE(h.StartFunction("function", 0xfde4abbed390c394LL)); + EXPECT_TRUE(h.Line(0xfde4abbed390c394LL, "source-file-name", 174823314)); + EXPECT_TRUE(h.EndFunction(0xfde4abbed390c3a4LL)); + EXPECT_TRUE(h.EndCompilationUnit(0xfee4abbed390c3a4LL)); + h.Finalize(); + + // Now check to see what has been added to the Module. + Module::File *file = m.FindExistingFile("source-file-name"); + ASSERT_TRUE(file != NULL); + + vector functions; + m.GetFunctions(&functions, functions.end()); + ASSERT_EQ((size_t) 1, functions.size()); + Module::Function *function = functions[0]; + EXPECT_STREQ("function", function->name.c_str()); + EXPECT_EQ(0xfde4abbed390c394LL, function->address); + EXPECT_EQ(0x10U, function->size); + EXPECT_EQ(0U, function->parameter_size); + ASSERT_EQ((size_t) 1, function->lines.size()); + Module::Line *line = &function->lines[0]; + EXPECT_EQ(0xfde4abbed390c394LL, line->address); + EXPECT_EQ(0x10U, line->size); // derived from EndFunction + EXPECT_TRUE(line->file == file); + EXPECT_EQ(174823314, line->number); +} + +TEST(InferSizes, LineSize) { + Module m("name", "os", "arch", "id"); + StabsToModule h(&m); + + // Feed in a simple compilation unit that defines a function with + // one line. + EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0xb4513962eff94e92LL, + "build-directory")); + EXPECT_TRUE(h.StartFunction("function", 0xb4513962eff94e92LL)); + EXPECT_TRUE(h.Line(0xb4513962eff94e92LL, "source-file-name-1", 77396614)); + EXPECT_TRUE(h.Line(0xb4513963eff94e92LL, "source-file-name-2", 87660088)); + EXPECT_TRUE(h.EndFunction(0)); // unknown function end address + EXPECT_TRUE(h.EndCompilationUnit(0)); // unknown CU end address + EXPECT_TRUE(h.StartCompilationUnit("compilation-unit-2", 0xb4523963eff94e92LL, + "build-directory-2")); // next boundary + EXPECT_TRUE(h.EndCompilationUnit(0)); + h.Finalize(); + + // Now check to see what has been added to the Module. + Module::File *file1 = m.FindExistingFile("source-file-name-1"); + ASSERT_TRUE(file1 != NULL); + Module::File *file2 = m.FindExistingFile("source-file-name-2"); + ASSERT_TRUE(file2 != NULL); + + vector functions; + m.GetFunctions(&functions, functions.end()); + ASSERT_EQ((size_t) 1, functions.size()); + + Module::Function *function = functions[0]; + EXPECT_STREQ("function", function->name.c_str()); + EXPECT_EQ(0xb4513962eff94e92LL, function->address); + EXPECT_EQ(0x1000100000000ULL, function->size); // inferred from CU end + EXPECT_EQ(0U, function->parameter_size); + ASSERT_EQ((size_t) 2, function->lines.size()); + + Module::Line *line1 = &function->lines[0]; + EXPECT_EQ(0xb4513962eff94e92LL, line1->address); + EXPECT_EQ(0x100000000ULL, line1->size); // derived from EndFunction + EXPECT_TRUE(line1->file == file1); + EXPECT_EQ(77396614, line1->number); + + Module::Line *line2 = &function->lines[1]; + EXPECT_EQ(0xb4513963eff94e92LL, line2->address); + EXPECT_EQ(0x1000000000000ULL, line2->size); // derived from EndFunction + EXPECT_TRUE(line2->file == file2); + EXPECT_EQ(87660088, line2->number); +} + +TEST(FunctionNames, Mangled) { + Module m("name", "os", "arch", "id"); + StabsToModule h(&m); + + // Compilation unit with one function, mangled name. + EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0xf2cfda63cef7f46cLL, + "build-directory")); + EXPECT_TRUE(h.StartFunction("_ZNSt6vectorIySaIyEE9push_backERKy", + 0xf2cfda63cef7f46dLL)); + EXPECT_TRUE(h.EndFunction(0)); + EXPECT_TRUE(h.EndCompilationUnit(0)); + + h.Finalize(); + + // Now check to see what has been added to the Module. + Module::File *file = m.FindExistingFile("compilation-unit"); + ASSERT_TRUE(file != NULL); + + vector functions; + m.GetFunctions(&functions, functions.end()); + ASSERT_EQ(1U, functions.size()); + + Module::Function *function = functions[0]; + // This is GCC-specific, but we shouldn't be seeing STABS data anywhere + // but Linux. + EXPECT_STREQ("std::vector >::" + "push_back(unsigned long long const&)", + function->name.c_str()); + EXPECT_EQ(0xf2cfda63cef7f46dLL, function->address); + EXPECT_LT(0U, function->size); // should have used dummy size + EXPECT_EQ(0U, function->parameter_size); + ASSERT_EQ(0U, function->lines.size()); +} + +// The GNU toolchain can omit functions that are not used; however, +// when it does so, it doesn't clean up the debugging information that +// refers to them. In STABS, this results in compilation units whose +// SO addresses are zero. +TEST(Omitted, Function) { + Module m("name", "os", "arch", "id"); + StabsToModule h(&m); + + // The StartCompilationUnit and EndCompilationUnit calls may both have an + // address of zero if the compilation unit has had sections removed. + EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0, "build-directory")); + EXPECT_TRUE(h.StartFunction("function", 0x2a133596)); + EXPECT_TRUE(h.EndFunction(0)); + EXPECT_TRUE(h.EndCompilationUnit(0)); +} + +// TODO --- if we actually cared about STABS. Even without these we've +// got full coverage of non-failure source lines in dump_stabs.cc. + +// Line size from next line +// Line size from function end +// Line size from next function start +// line size from cu end +// line size from next cu start +// fallback size is something plausible + +// function size from function end +// function size from next function start +// function size from cu end +// function size from next cu start +// fallback size is something plausible + +// omitting functions outside the compilation unit's address range +// zero-line, one-line, many-line functions diff --git a/src/tools/linux/dump_syms/Makefile b/src/tools/linux/dump_syms/Makefile index 800e3add..17f94722 100644 --- a/src/tools/linux/dump_syms/Makefile +++ b/src/tools/linux/dump_syms/Makefile @@ -77,18 +77,18 @@ COVERAGE_SOURCES = all:: dump_syms dump_syms: \ bytereader.o \ - dwarf_cfi_to_module.o \ - dwarf_cu_to_module.o \ - dwarf_line_to_module.o \ - dump_stabs.o \ dump_symbols.o \ dump_syms.o \ dwarf2diehandler.o \ dwarf2reader.o \ + dwarf_cfi_to_module.o \ + dwarf_cu_to_module.o \ + dwarf_line_to_module.o \ file_id.o \ language.o \ module.o \ stabs_reader.o \ + stabs_to_module.o \ $(empty) CPP_EXECUTABLES += dump_syms clean:: @@ -103,13 +103,13 @@ dwarf_cu_to_module.o: dwarf_cu_to_module.cc COVERAGE_SOURCES += dwarf_cu_to_module.cc dwarf_line_to_module.o: dwarf_line_to_module.cc COVERAGE_SOURCES += dwarf_line_to_module.cc -dump_stabs.o: dump_stabs.cc -COVERAGE_SOURCES += dump_stabs.cc language.o: language.cc module.o: module.cc COVERAGE_SOURCES += module.cc stabs_reader.o: stabs_reader.cc COVERAGE_SOURCES += stabs_reader.cc +stabs_to_module.o: stabs_to_module.cc +COVERAGE_SOURCES += stabs_to_module.cc VPATH += $(SRC)/common/linux dump_symbols.o: dump_symbols.cc @@ -167,10 +167,10 @@ clean:: check: check-file_id_unittest check-file_id_unittest: file_id_unittest file_id_unittest: \ + file_id.o \ gmock-all.o \ gtest-all.o \ gtest_main.o \ - file_id.o \ $(empty) CPP_EXECUTABLES += file_id_unittest file_id_unittest.o: file_id_unittest.cc @@ -198,30 +198,31 @@ clean:: ### Unit tests for google_breakpad::DumpStabsHandler. -check: check-dump_stabs_unittest -check-dump_stabs_unittest: dump_stabs_unittest -dump_stabs_unittest: \ +check: check-stabs_to_module_unittest +check-stabs_to_module_unittest: stabs_to_module_unittest +stabs_to_module_unittest: \ gtest-all.o \ gtest_main.o \ - dump_stabs.o \ - dump_stabs_unittest.o \ module.o \ + stabs_to_module.o \ + stabs_to_module_unittest.o \ $(empty) -CPP_EXECUTABLES += dump_stabs_unittest -dump_stabs_unittest.o: dump_stabs_unittest.cc -dump_stabs_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) $(GMOCK_CPPFLAGS) +CPP_EXECUTABLES += stabs_to_module_unittest +stabs_to_module_unittest.o: stabs_to_module_unittest.cc +stabs_to_module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \ + $(GMOCK_CPPFLAGS) clean:: - rm -f dump_stabs_unittest + rm -f stabs_to_module_unittest ### Unit tests for dwarf2reader::DwarfDIEDispatcher. check: check-dwarf2diehandler_unittest check-dwarf2diehandler_unittest: dwarf2diehandler_unittest dwarf2diehandler_unittest: \ + dwarf2diehandler.o \ gmock-all.o \ gtest-all.o \ gtest_main.o \ - dwarf2diehandler.o \ $(empty) CPP_EXECUTABLES += dwarf2diehandler_unittest dwarf2diehandler_unittest.o: dwarf2diehandler_unittest.cc @@ -236,10 +237,10 @@ clean:: check: check-dwarf_line_to_module_unittest check-dwarf_line_to_module_unittest: dwarf_line_to_module_unittest dwarf_line_to_module_unittest: \ + dwarf_line_to_module.o \ gtest-all.o \ gtest_main.o \ module.o \ - dwarf_line_to_module.o \ $(empty) CPP_EXECUTABLES += dwarf_line_to_module_unittest dwarf_line_to_module_unittest.o: dwarf_line_to_module_unittest.cc -- cgit v1.2.1