mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-22 19:55:42 +00:00
mac: conditionally generate inlines
Change-Id: I35d7a5e50537bd6f20bcb5a91d386ffee9325b18 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3098093 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
bc7ddae234
commit
3c70e0145e
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue