diff options
author | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-01-22 13:36:39 +0000 |
---|---|---|
committer | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-01-22 13:36:39 +0000 |
commit | c6f6d9ef308b7651b9dc8f4027fc9705cd9a93b7 (patch) | |
tree | ec8c3c1e1b22e4e62e4baf1630e98f14e061b338 /src/tools | |
parent | Remove <(library) usage from gyp files. (diff) | |
download | breakpad-c6f6d9ef308b7651b9dc8f4027fc9705cd9a93b7.tar.xz |
Make DumpSymbols methods take a vector of debug_dirs
r=thestig at https://breakpad.appspot.com/512002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1102 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/linux/dump_syms/dump_syms.cc | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/tools/linux/dump_syms/dump_syms.cc b/src/tools/linux/dump_syms/dump_syms.cc index adac216c..aa504589 100644 --- a/src/tools/linux/dump_syms/dump_syms.cc +++ b/src/tools/linux/dump_syms/dump_syms.cc @@ -32,6 +32,7 @@ #include <cstring> #include <iostream> #include <string> +#include <vector> #include "common/linux/dump_symbols.h" @@ -39,7 +40,7 @@ using google_breakpad::WriteSymbolFile; int usage(const char* self) { fprintf(stderr, "Usage: %s [OPTION] <binary-with-debugging-info> " - "[directory-for-debug-file]\n\n", self); + "[directories-for-debug-file]\n\n", self); fprintf(stderr, "Options:\n"); fprintf(stderr, " -c Do not generate CFI section\n"); return 1; @@ -50,24 +51,24 @@ int main(int argc, char **argv) { return usage(argv[0]); bool cfi = true; - if (strcmp("-c", argv[1]) == 0) + int binary_index = 1; + if (strcmp("-c", argv[1]) == 0) { cfi = false; + ++binary_index; + } if (!cfi && argc == 2) return usage(argv[0]); const char *binary; - std::string debug_dir; - if (cfi) { - binary = argv[1]; - if (argc == 3) - debug_dir = argv[2]; - } else { - binary = argv[2]; - if (argc == 4) - debug_dir = argv[3]; + std::vector<string> debug_dirs; + binary = argv[binary_index]; + for (int debug_dir_index = binary_index + 1; + debug_dir_index < argc; + ++debug_dir_index) { + debug_dirs.push_back(argv[debug_dir_index]); } - if (!WriteSymbolFile(binary, debug_dir, cfi, std::cout)) { + if (!WriteSymbolFile(binary, debug_dirs, cfi, std::cout)) { fprintf(stderr, "Failed to write symbol file.\n"); return 1; } |