diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/linux/dump_symbols.cc | 3 | ||||
-rw-r--r-- | src/common/linux/dump_symbols.h | 13 | ||||
-rw-r--r-- | src/tools/linux/dump_syms/dump_syms.cc | 7 |
3 files changed, 11 insertions, 12 deletions
diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc index 61dbee86..02d26987 100644 --- a/src/common/linux/dump_symbols.cc +++ b/src/common/linux/dump_symbols.cc @@ -355,8 +355,7 @@ std::string BaseFileName(const std::string &filename) { namespace google_breakpad { -bool DumpSymbols::WriteSymbolFile(const std::string &obj_file, - FILE *sym_file) { +bool WriteSymbolFile(const std::string &obj_file, FILE *sym_file) { int obj_fd = open(obj_file.c_str(), O_RDONLY); if (obj_fd < 0) { fprintf(stderr, "Failed to open ELF file '%s': %s\n", diff --git a/src/common/linux/dump_symbols.h b/src/common/linux/dump_symbols.h index 5093da10..0b6d0c02 100644 --- a/src/common/linux/dump_symbols.h +++ b/src/common/linux/dump_symbols.h @@ -1,4 +1,6 @@ -// Copyright (c) 2006, Google Inc. +// -*- mode: c++ -*- + +// Copyright (c) 2010, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -38,11 +40,10 @@ namespace google_breakpad { -class DumpSymbols { - public: - bool WriteSymbolFile(const std::string &obj_file, - FILE *sym_file); -}; +// Find all the debugging information in OBJ_FILE, an ELF executable +// or shared library, and write it to SYM_FILE in the Breakpad symbol +// file format. +bool WriteSymbolFile(const std::string &obj_file, FILE *sym_file); } // namespace google_breakpad diff --git a/src/tools/linux/dump_syms/dump_syms.cc b/src/tools/linux/dump_syms/dump_syms.cc index f75abef8..9667b38d 100644 --- a/src/tools/linux/dump_syms/dump_syms.cc +++ b/src/tools/linux/dump_syms/dump_syms.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006, Google Inc. +// Copyright (c) 2010, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -36,14 +36,13 @@ using namespace google_breakpad; int main(int argc, char **argv) { if (argc != 2) { - fprintf(stderr, "Usage: %s <binary-with-stab-symbol>\n", argv[0]); + fprintf(stderr, "Usage: %s <binary-with-debugging-info>\n", argv[0]); return 1; } const char *binary = argv[1]; - DumpSymbols dumper; - if (!dumper.WriteSymbolFile(binary, stdout)) { + if (!WriteSymbolFile(binary, stdout)) { fprintf(stderr, "Failed to write symbol file.\n"); return 1; } |