aboutsummaryrefslogtreecommitdiff
path: root/src/tools/linux
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-07-16 00:43:42 +0000
committerthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-07-16 00:43:42 +0000
commit56eac4dd7a475192e6c00b6a507e0f4b5ce05efe (patch)
treef0d80566daeb7a9a28799f38fc2b78e490760e9c /src/tools/linux
parentRemove duplicate FUNC entries from dump_syms output. (diff)
downloadbreakpad-56eac4dd7a475192e6c00b6a507e0f4b5ce05efe.tar.xz
Add functionality to read the .gnu_debuglink section and load symbols from a debug ELF file.
Review URL: http://breakpad.appspot.com/126001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@624 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/tools/linux')
-rw-r--r--src/tools/linux/dump_syms/dump_syms.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tools/linux/dump_syms/dump_syms.cc b/src/tools/linux/dump_syms/dump_syms.cc
index 67f5ad53..7d721a8c 100644
--- a/src/tools/linux/dump_syms/dump_syms.cc
+++ b/src/tools/linux/dump_syms/dump_syms.cc
@@ -32,17 +32,21 @@
#include "common/linux/dump_symbols.h"
-using namespace google_breakpad;
+using google_breakpad::WriteSymbolFile;
int main(int argc, char **argv) {
- if (argc != 2) {
- fprintf(stderr, "Usage: %s <binary-with-debugging-info>\n", argv[0]);
+ if (argc < 2 || argc > 3) {
+ fprintf(stderr, "Usage: %s <binary-with-debugging-info> "
+ "[directory-for-debug-file]\n", argv[0]);
return 1;
}
const char *binary = argv[1];
+ std::string debug_dir;
+ if (argc == 3)
+ debug_dir = argv[2];
- if (!WriteSymbolFile(binary, stdout)) {
+ if (!WriteSymbolFile(binary, debug_dir, stdout)) {
fprintf(stderr, "Failed to write symbol file.\n");
return 1;
}