Revert "Added a switch to dump minidump modules in minidump_stackwalk."
This reverts commit cb936a0243c97ae9cd2d4bb19d95dde0421fed6d. A=dyen@chromium.org Original Review: https://codereview.chromium.org/1672773002/ R=dyen@chromium.org Review URL: https://codereview.chromium.org/1688493003 .
This commit is contained in:
parent
4912669df1
commit
a8f79b0fde
3 changed files with 5 additions and 30 deletions
|
@ -71,8 +71,7 @@ using google_breakpad::scoped_ptr;
|
||||||
bool PrintMinidumpProcess(const string &minidump_file,
|
bool PrintMinidumpProcess(const string &minidump_file,
|
||||||
const std::vector<string> &symbol_paths,
|
const std::vector<string> &symbol_paths,
|
||||||
bool machine_readable,
|
bool machine_readable,
|
||||||
bool output_stack_contents,
|
bool output_stack_contents) {
|
||||||
bool output_modules_only) {
|
|
||||||
scoped_ptr<SimpleSymbolSupplier> symbol_supplier;
|
scoped_ptr<SimpleSymbolSupplier> symbol_supplier;
|
||||||
if (!symbol_paths.empty()) {
|
if (!symbol_paths.empty()) {
|
||||||
// TODO(mmentovai): check existence of symbol_path if specified?
|
// TODO(mmentovai): check existence of symbol_path if specified?
|
||||||
|
@ -95,9 +94,7 @@ bool PrintMinidumpProcess(const string &minidump_file,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (output_modules_only) {
|
if (machine_readable) {
|
||||||
PrintProcessModules(process_state);
|
|
||||||
} else if (machine_readable) {
|
|
||||||
PrintProcessStateMachineReadable(process_state);
|
PrintProcessStateMachineReadable(process_state);
|
||||||
} else {
|
} else {
|
||||||
PrintProcessState(process_state, output_stack_contents, &resolver);
|
PrintProcessState(process_state, output_stack_contents, &resolver);
|
||||||
|
@ -107,10 +104,9 @@ bool PrintMinidumpProcess(const string &minidump_file,
|
||||||
}
|
}
|
||||||
|
|
||||||
void usage(const char *program_name) {
|
void usage(const char *program_name) {
|
||||||
fprintf(stderr, "usage: %s [-m|-s|-b] <minidump-file> [symbol-path ...]\n"
|
fprintf(stderr, "usage: %s [-m|-s] <minidump-file> [symbol-path ...]\n"
|
||||||
" -m : Output in machine-readable format\n"
|
" -m : Output in machine-readable format\n"
|
||||||
" -s : Output stack contents\n"
|
" -s : Output stack contents\n",
|
||||||
" -b : Output contained full module paths\n",
|
|
||||||
program_name);
|
program_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +123,6 @@ int main(int argc, char **argv) {
|
||||||
const char *minidump_file;
|
const char *minidump_file;
|
||||||
bool machine_readable = false;
|
bool machine_readable = false;
|
||||||
bool output_stack_contents = false;
|
bool output_stack_contents = false;
|
||||||
bool output_modules_only = false;
|
|
||||||
int symbol_path_arg;
|
int symbol_path_arg;
|
||||||
|
|
||||||
if (strcmp(argv[1], "-m") == 0) {
|
if (strcmp(argv[1], "-m") == 0) {
|
||||||
|
@ -148,15 +143,6 @@ int main(int argc, char **argv) {
|
||||||
output_stack_contents = true;
|
output_stack_contents = true;
|
||||||
minidump_file = argv[2];
|
minidump_file = argv[2];
|
||||||
symbol_path_arg = 3;
|
symbol_path_arg = 3;
|
||||||
} else if (strcmp(argv[1], "-b") == 0) {
|
|
||||||
if (argc < 3) {
|
|
||||||
usage(argv[0]);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
output_modules_only = true;
|
|
||||||
minidump_file = argv[2];
|
|
||||||
symbol_path_arg = 3;
|
|
||||||
} else {
|
} else {
|
||||||
minidump_file = argv[1];
|
minidump_file = argv[1];
|
||||||
symbol_path_arg = 2;
|
symbol_path_arg = 2;
|
||||||
|
@ -172,6 +158,5 @@ int main(int argc, char **argv) {
|
||||||
return PrintMinidumpProcess(minidump_file,
|
return PrintMinidumpProcess(minidump_file,
|
||||||
symbol_paths,
|
symbol_paths,
|
||||||
machine_readable,
|
machine_readable,
|
||||||
output_stack_contents,
|
output_stack_contents) ? 0 : 1;
|
||||||
output_modules_only) ? 0 : 1;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -926,13 +926,4 @@ void PrintProcessStateMachineReadable(const ProcessState& process_state) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintProcessModules(const ProcessState& process_state) {
|
|
||||||
const CodeModules* modules = process_state.modules();
|
|
||||||
const unsigned int module_count = modules->module_count();
|
|
||||||
for (unsigned int i = 0; i < module_count; ++i) {
|
|
||||||
const CodeModule* module = modules->GetModuleAtSequence(i);
|
|
||||||
printf("%s\n", module->code_file().c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace google_breakpad
|
} // namespace google_breakpad
|
||||||
|
|
|
@ -43,7 +43,6 @@ void PrintProcessStateMachineReadable(const ProcessState& process_state);
|
||||||
void PrintProcessState(const ProcessState& process_state,
|
void PrintProcessState(const ProcessState& process_state,
|
||||||
bool output_stack_contents,
|
bool output_stack_contents,
|
||||||
SourceLineResolverInterface* resolver);
|
SourceLineResolverInterface* resolver);
|
||||||
void PrintProcessModules(const ProcessState& process_state);
|
|
||||||
|
|
||||||
} // namespace google_breakpad
|
} // namespace google_breakpad
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue