mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-12 03:12:58 +00:00
Add option to enable multiple symbol field in Linux tool
Bug: google-breakpad:751 Change-Id: I63a4d652413ef7311da7494fbd8fb816445eb353 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4089183 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
@@ -56,6 +56,9 @@ int usage(const char* self) {
|
||||
fprintf(stderr, " -n <name> Use specified name for name of the object\n");
|
||||
fprintf(stderr, " -o <os> Use specified name for the "
|
||||
"operating system\n");
|
||||
fprintf(stderr, " -m Enable writing the optional 'm' field on FUNC"
|
||||
"and PUBLIC, denoting multiple symbols for "
|
||||
"the address.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -67,6 +70,7 @@ int main(int argc, char** argv) {
|
||||
bool handle_inlines = false;
|
||||
bool handle_inter_cu_refs = true;
|
||||
bool log_to_stderr = false;
|
||||
bool enable_multiple_field = false;
|
||||
std::string obj_name;
|
||||
const char* obj_os = "Linux";
|
||||
int arg_index = 1;
|
||||
@@ -96,6 +100,8 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
obj_os = argv[arg_index + 1];
|
||||
++arg_index;
|
||||
} else if (strcmp("-m", argv[arg_index]) == 0) {
|
||||
enable_multiple_field = true;
|
||||
} else {
|
||||
printf("2.4 %s\n", argv[arg_index]);
|
||||
return usage(argv[0]);
|
||||
@@ -132,7 +138,8 @@ int main(int argc, char** argv) {
|
||||
} else {
|
||||
SymbolData symbol_data = (handle_inlines ? INLINES : NO_DATA) |
|
||||
(cfi ? CFI : NO_DATA) | SYMBOLS_AND_FILES;
|
||||
google_breakpad::DumpOptions options(symbol_data, handle_inter_cu_refs);
|
||||
google_breakpad::DumpOptions options(symbol_data, handle_inter_cu_refs,
|
||||
enable_multiple_field);
|
||||
if (!WriteSymbolFile(binary, obj_name, obj_os, debug_dirs, options,
|
||||
std::cout)) {
|
||||
fprintf(saved_stderr, "Failed to write symbol file.\n");
|
||||
|
||||
Reference in New Issue
Block a user