mirror of
https://github.com/yuzu-emu/breakpad
synced 2024-11-23 02:33:39 +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
1 changed files with 7 additions and 2 deletions
|
@ -52,7 +52,7 @@ using std::vector;
|
||||||
struct Options {
|
struct Options {
|
||||||
Options()
|
Options()
|
||||||
: srcPath(), dsymPath(), arch(), header_only(false),
|
: 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 srcPath;
|
||||||
string dsymPath;
|
string dsymPath;
|
||||||
|
@ -60,6 +60,7 @@ struct Options {
|
||||||
bool header_only;
|
bool header_only;
|
||||||
bool cfi;
|
bool cfi;
|
||||||
bool handle_inter_cu_refs;
|
bool handle_inter_cu_refs;
|
||||||
|
bool handle_inlines;
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool StackFrameEntryComparator(const Module::StackFrameEntry* a,
|
static bool StackFrameEntryComparator(const Module::StackFrameEntry* a,
|
||||||
|
@ -108,7 +109,8 @@ static void CopyCFIDataBetweenModules(Module* to_module,
|
||||||
|
|
||||||
static bool Start(const Options& options) {
|
static bool Start(const Options& options) {
|
||||||
SymbolData symbol_data =
|
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);
|
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
|
// 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");
|
"Mach-o file\n");
|
||||||
fprintf(stderr, "\t-c: Do not generate CFI section\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-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-h: Usage\n");
|
||||||
fprintf(stderr, "\t-?: Usage\n");
|
fprintf(stderr, "\t-?: Usage\n");
|
||||||
}
|
}
|
||||||
|
@ -236,6 +239,8 @@ static void SetupOptions(int argc, const char *argv[], Options *options) {
|
||||||
case 'r':
|
case 'r':
|
||||||
options->handle_inter_cu_refs = false;
|
options->handle_inter_cu_refs = false;
|
||||||
break;
|
break;
|
||||||
|
case 'd':
|
||||||
|
options->handle_inlines = true;
|
||||||
case '?':
|
case '?':
|
||||||
case 'h':
|
case 'h':
|
||||||
Usage(argc, argv);
|
Usage(argc, argv);
|
||||||
|
|
Loading…
Reference in a new issue