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
This commit is contained in:
mmentovai 2010-08-25 16:19:58 +00:00
parent c2c4192c1b
commit 2452f06b16

View File

@ -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);