mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-07-03 17:18:14 +00:00
Issue 147 - reviewer Waylonis
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@144 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
29789d8106
commit
e9017f3239
|
@ -207,18 +207,40 @@ static BOOL StringTailMatches(NSString *str, NSString *tail) {
|
||||||
[symbols addObject:symbol];
|
[symbols addObject:symbol];
|
||||||
}
|
}
|
||||||
|
|
||||||
NSArray *converted = [self convertCPlusPlusSymbols:symbols];
|
// In order to deal with crashing problems in c++filt, we setup
|
||||||
[symbols release];
|
// a while loop to handle the case where convertCPlusPlusSymbols
|
||||||
|
// only returns partial results.
|
||||||
|
// We then attempt to continue from the point where c++filt failed
|
||||||
|
// and add the partial results to the total results until we're
|
||||||
|
// completely done.
|
||||||
|
|
||||||
for (unsigned int i = 0; i < count; ++i) {
|
unsigned int totalIndex = 0;
|
||||||
|
unsigned int totalCount = count;
|
||||||
|
|
||||||
|
while (totalIndex < totalCount) {
|
||||||
|
NSRange range = NSMakeRange(totalIndex, totalCount - totalIndex);
|
||||||
|
NSArray *subarray = [symbols subarrayWithRange:range];
|
||||||
|
NSArray *converted = [self convertCPlusPlusSymbols:subarray];
|
||||||
|
unsigned int convertedCount = [converted count];
|
||||||
|
|
||||||
|
if (convertedCount == 0) {
|
||||||
|
break; // we give up at this point
|
||||||
|
}
|
||||||
|
|
||||||
|
for (unsigned int convertedIndex = 0;
|
||||||
|
convertedIndex < convertedCount && totalIndex < totalCount;
|
||||||
|
++totalIndex, ++convertedIndex) {
|
||||||
NSMutableDictionary *dict = [addresses_ objectForKey:
|
NSMutableDictionary *dict = [addresses_ objectForKey:
|
||||||
[addresses objectAtIndex:i]];
|
[addresses objectAtIndex:totalIndex]];
|
||||||
NSString *symbol = [converted objectAtIndex:i];
|
NSString *symbol = [converted objectAtIndex:convertedIndex];
|
||||||
|
|
||||||
// Only add if this is a non-zero length symbol
|
// Only add if this is a non-zero length symbol
|
||||||
if ([symbol length])
|
if ([symbol length])
|
||||||
[dict setObject:symbol forKey:kAddressConvertedSymbolKey];
|
[dict setObject:symbol forKey:kAddressConvertedSymbolKey];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[symbols release];
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
Loading…
Reference in a new issue