Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Unified Diff: src/tools/mac/dump_syms/dump_syms_tool.cc

Issue 1864823002: Added an option (-i) to have dump_syms output header information only. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: merge Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/tools/linux/dump_syms/dump_syms.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/tools/mac/dump_syms/dump_syms_tool.cc
diff --git a/src/tools/mac/dump_syms/dump_syms_tool.cc b/src/tools/mac/dump_syms/dump_syms_tool.cc
index 54f29226116dfc4669b434d4a892d01080d6f421..6f68457b4c1632379a35551b0170595fdd31b440 100644
--- a/src/tools/mac/dump_syms/dump_syms_tool.cc
+++ b/src/tools/mac/dump_syms/dump_syms_tool.cc
@@ -51,11 +51,13 @@ using std::vector;
struct Options {
Options()
- : srcPath(), dsymPath(), arch(), cfi(true), handle_inter_cu_refs(true) {}
+ : srcPath(), dsymPath(), arch(), header_only(false),
+ cfi(true), handle_inter_cu_refs(true) {}
string srcPath;
string dsymPath;
const NXArchInfo *arch;
+ bool header_only;
bool cfi;
bool handle_inter_cu_refs;
};
@@ -151,6 +153,9 @@ static bool Start(const Options &options) {
}
}
+ if (options.header_only)
+ return dump_symbols.WriteSymbolFileHeader(std::cout);
+
// Read the primary file into a Breakpad Module.
Module* module = NULL;
if (!dump_symbols.ReadSymbolData(&module))
@@ -189,6 +194,7 @@ static void Usage(int argc, const char *argv[]) {
fprintf(stderr, "Output a Breakpad symbol file from a Mach-o file.\n");
fprintf(stderr, "Usage: %s [-a ARCHITECTURE] [-c] [-g dSYM path] "
"<Mach-o file>\n", argv[0]);
+ fprintf(stderr, "\t-i: Output module header information only.\n");
fprintf(stderr, "\t-a: Architecture type [default: native, or whatever is\n");
fprintf(stderr, "\t in the file, if it contains only one architecture]\n");
fprintf(stderr, "\t-g: Debug symbol file (dSYM) to dump in addition to the "
@@ -204,8 +210,11 @@ static void SetupOptions(int argc, const char *argv[], Options *options) {
extern int optind;
signed char ch;
- while ((ch = getopt(argc, (char * const *)argv, "a:g:chr?")) != -1) {
+ while ((ch = getopt(argc, (char * const *)argv, "ia:g:chr?")) != -1) {
switch (ch) {
+ case 'i':
+ options->header_only = true;
+ break;
case 'a': {
const NXArchInfo *arch_info =
google_breakpad::BreakpadGetArchInfoFromName(optarg);
« no previous file with comments | « src/tools/linux/dump_syms/dump_syms.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698