From 2452f06b164ce635ca8153d2fd9e49f14a4c3d1d Mon Sep 17 00:00:00 2001 From: mmentovai Date: Wed, 25 Aug 2010 16:19:58 +0000 Subject: [PATCH] In on_demand_symbol_supplier, recognize architecture x86 and transform it to i386 when requesting an on-demand dump of symbols. The string is passed to system routines that understand this architecture as i386. Review URL: http://breakpad.appspot.com/162001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@668 4c0a9323-5329-0410-9bdc-e9ce6186880e --- .../mac/crash_report/on_demand_symbol_supplier.mm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tools/mac/crash_report/on_demand_symbol_supplier.mm b/src/tools/mac/crash_report/on_demand_symbol_supplier.mm index 4cc64f6a..ad55412f 100644 --- a/src/tools/mac/crash_report/on_demand_symbol_supplier.mm +++ b/src/tools/mac/crash_report/on_demand_symbol_supplier.mm @@ -251,7 +251,15 @@ bool OnDemandSymbolSupplier::GenerateSymbolFile(const CodeModule *module, length:module_path.length()]; DumpSymbols dump; if (dump.Read(module_str)) { - if (dump.SetArchitecture(system_info->cpu)) { + // What Breakpad calls "x86" should be given to the system as "i386". + std::string architecture; + if (system_info->cpu.compare("x86") == 0) { + architecture = "i386"; + } else { + architecture = system_info->cpu; + } + + if (dump.SetArchitecture(architecture)) { FILE *file = fopen([symbol_path fileSystemRepresentation],"w"); if (file) { dump.WriteSymbolFile(file);