mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-24 13:35:46 +01:00
Issue 284 - DWARF dumper doesn't output function names including arguments. r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@302 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
7837cb7236
commit
d3441c2c96
@ -63,7 +63,6 @@ static NSString *kHeaderSizeKey = @"size";
|
||||
static NSString *kHeaderOffsetKey = @"offset"; // Offset to the header
|
||||
static NSString *kHeaderIs64BitKey = @"is64";
|
||||
static NSString *kHeaderCPUTypeKey = @"cpuType";
|
||||
static NSString *kUnknownSymbol = @"???";
|
||||
|
||||
// The section for __TEXT, __text seems to be always 1. This is useful
|
||||
// for pruning out extraneous non-function symbols.
|
||||
@ -434,6 +433,15 @@ void DumpFunctionMap(const dwarf2reader::FunctionMap function_map) {
|
||||
[dict setObject:symbolName forKey:kAddressSymbolKey];
|
||||
}
|
||||
|
||||
// try demangling function name if we have a mangled name
|
||||
if (![dict objectForKey:kAddressConvertedSymbolKey] &&
|
||||
!iter->second->mangled_name.empty()) {
|
||||
NSString *mangled = [NSString stringWithUTF8String:iter->second->mangled_name.c_str()];
|
||||
NSString *demangled = [self convertCPlusPlusSymbol:mangled];
|
||||
if (demangled != nil)
|
||||
[dict setObject:demangled forKey:kAddressConvertedSymbolKey];
|
||||
}
|
||||
|
||||
// set line number for beginning of function
|
||||
if (iter->second->line && ![dict objectForKey:kAddressSourceLineKey])
|
||||
[dict setObject:[NSNumber numberWithUnsignedInt:iter->second->line]
|
||||
|
@ -152,8 +152,12 @@ void CUFunctionInfoHandler::ProcessAttributeString(uint64 offset,
|
||||
enum DwarfAttribute attr,
|
||||
enum DwarfForm form,
|
||||
const string &data) {
|
||||
if (attr == DW_AT_name && current_function_info_)
|
||||
current_function_info_->name = data;
|
||||
if (current_function_info_) {
|
||||
if (attr == DW_AT_name)
|
||||
current_function_info_->name = data;
|
||||
else if(attr == DW_AT_MIPS_linkage_name)
|
||||
current_function_info_->mangled_name = data;
|
||||
}
|
||||
}
|
||||
|
||||
void CUFunctionInfoHandler::ProcessAttributeUnsigned(uint64 offset,
|
||||
|
@ -47,6 +47,8 @@ namespace dwarf2reader {
|
||||
struct FunctionInfo {
|
||||
// Name of the function
|
||||
string name;
|
||||
// Mangled name of the function
|
||||
string mangled_name;
|
||||
// File containing this function
|
||||
string file;
|
||||
// Line number for start of function.
|
||||
|
Loading…
Reference in New Issue
Block a user