mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-02-02 21:10:58 +00:00
Breakpad uses x86 as the architecture name, not i386. Most tools don't care
what architecture name is shown in a symbol file's MODULE line, but the Mac crash_report tool's on_demand_symbol_supplier does. The new Mac dumper inadvertently used i386. Correct that to make it x86. Temporarily make the on_demand_symbol_supplier accept symbol files whose architecture is i386. Also add x86_64 to the set of architectures that the on_demand_symbol_supplier considers valid. BUG=none TEST=none Review URL: http://breakpad.appspot.com/143001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@638 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
0fdc829d32
commit
0ab73db415
|
@ -449,12 +449,16 @@ bool DumpSymbols::WriteSymbolFile(FILE *stream) {
|
||||||
= NXGetArchInfoFromCpuType(selected_object_file_->cputype,
|
= NXGetArchInfoFromCpuType(selected_object_file_->cputype,
|
||||||
selected_object_file_->cpusubtype);
|
selected_object_file_->cpusubtype);
|
||||||
|
|
||||||
|
const char *selected_arch_name = selected_arch_info->name;
|
||||||
|
if (strcmp(selected_arch_name, "i386") == 0)
|
||||||
|
selected_arch_name = "x86";
|
||||||
|
|
||||||
// Produce a name to use in error messages that includes the
|
// Produce a name to use in error messages that includes the
|
||||||
// filename, and the architecture, if there is more than one.
|
// filename, and the architecture, if there is more than one.
|
||||||
selected_object_name_ = [object_filename_ UTF8String];
|
selected_object_name_ = [object_filename_ UTF8String];
|
||||||
if (object_files_.size() > 1) {
|
if (object_files_.size() > 1) {
|
||||||
selected_object_name_ += ", architecture ";
|
selected_object_name_ += ", architecture ";
|
||||||
selected_object_name_ + selected_arch_info->name;
|
selected_object_name_ + selected_arch_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute a module name, to appear in the MODULE record.
|
// Compute a module name, to appear in the MODULE record.
|
||||||
|
@ -467,7 +471,7 @@ bool DumpSymbols::WriteSymbolFile(FILE *stream) {
|
||||||
identifier += "0";
|
identifier += "0";
|
||||||
|
|
||||||
// Create a module to hold the debugging information.
|
// Create a module to hold the debugging information.
|
||||||
Module module([module_name UTF8String], "mac", selected_arch_info->name,
|
Module module([module_name UTF8String], "mac", selected_arch_name,
|
||||||
identifier);
|
identifier);
|
||||||
|
|
||||||
// Parse the selected object file.
|
// Parse the selected object file.
|
||||||
|
|
|
@ -86,7 +86,10 @@ OnDemandSymbolSupplier::OnDemandSymbolSupplier(const string &search_dir,
|
||||||
NSScanner *scanner = [NSScanner scannerWithString:dataStr];
|
NSScanner *scanner = [NSScanner scannerWithString:dataStr];
|
||||||
BOOL goodScan = [scanner scanString:@"MODULE mac " intoString:nil];
|
BOOL goodScan = [scanner scanString:@"MODULE mac " intoString:nil];
|
||||||
if (goodScan) {
|
if (goodScan) {
|
||||||
|
// TODO(mark): remove i386 from this list.
|
||||||
goodScan = ([scanner scanString:@"x86 " intoString:nil] ||
|
goodScan = ([scanner scanString:@"x86 " intoString:nil] ||
|
||||||
|
[scanner scanString:@"i386 " intoString:nil] ||
|
||||||
|
[scanner scanString:@"x86_64 " intoString:nil] ||
|
||||||
[scanner scanString:@"ppc " intoString:nil]);
|
[scanner scanString:@"ppc " intoString:nil]);
|
||||||
if (goodScan) {
|
if (goodScan) {
|
||||||
NSString *moduleID;
|
NSString *moduleID;
|
||||||
|
|
Loading…
Reference in a new issue