diff --git a/src/tools/mac/dump_syms/dump_syms_tool.cc b/src/tools/mac/dump_syms/dump_syms_tool.cc index df2f49f1..fcbb9169 100644 --- a/src/tools/mac/dump_syms/dump_syms_tool.cc +++ b/src/tools/mac/dump_syms/dump_syms_tool.cc @@ -52,7 +52,7 @@ using std::vector; struct Options { Options() : srcPath(), dsymPath(), arch(), header_only(false), - cfi(true), handle_inter_cu_refs(true) {} + cfi(true), handle_inter_cu_refs(true), handle_inlines(false) {} string srcPath; string dsymPath; @@ -60,6 +60,7 @@ struct Options { bool header_only; bool cfi; bool handle_inter_cu_refs; + bool handle_inlines; }; static bool StackFrameEntryComparator(const Module::StackFrameEntry* a, @@ -108,7 +109,8 @@ static void CopyCFIDataBetweenModules(Module* to_module, static bool Start(const Options& options) { SymbolData symbol_data = - INLINES | (options.cfi ? CFI : NO_DATA) | SYMBOLS_AND_FILES; + (options.handle_inlines ? INLINES : NO_DATA) | + (options.cfi ? CFI : NO_DATA) | SYMBOLS_AND_FILES; DumpSymbols dump_symbols(symbol_data, options.handle_inter_cu_refs); // For x86_64 binaries, the CFI data is in the __TEXT,__eh_frame of the @@ -202,6 +204,7 @@ static void Usage(int argc, const char *argv[]) { "Mach-o file\n"); fprintf(stderr, "\t-c: Do not generate CFI section\n"); fprintf(stderr, "\t-r: Do not handle inter-compilation unit references\n"); + fprintf(stderr, "\t-d: Generate INLINE and INLINE_ORIGIN records\n"); fprintf(stderr, "\t-h: Usage\n"); fprintf(stderr, "\t-?: Usage\n"); } @@ -236,6 +239,8 @@ static void SetupOptions(int argc, const char *argv[], Options *options) { case 'r': options->handle_inter_cu_refs = false; break; + case 'd': + options->handle_inlines = true; case '?': case 'h': Usage(argc, argv);