From 32441cc0608ddaf81885d23acf63f4b53cb73744 Mon Sep 17 00:00:00 2001 From: nealsid Date: Wed, 22 Oct 2008 05:08:50 +0000 Subject: Issue 181: Add version info for Mac OS X modules. Found by iterating over load commands until I found LC_ID_DYLIB. Also modified crash_report to generate version number. Also added suspend/resume capability to exception handler, necessary because exception handling can behave strangely across fork() calls. Also added fix for filtering out functions with no line number information, and for filtering out some multiple inheritance glue the compiler generates. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@291 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/mac/dump_syms.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/common/mac') diff --git a/src/common/mac/dump_syms.mm b/src/common/mac/dump_syms.mm index 5e6dbde0..34d811de 100644 --- a/src/common/mac/dump_syms.mm +++ b/src/common/mac/dump_syms.mm @@ -502,7 +502,7 @@ void DumpFunctionMap(const dwarf2reader::FunctionMap function_map) { } // set line number for beginning of function - if (![dict objectForKey:kAddressSourceLineKey]) + if (iter->second->line && ![dict objectForKey:kAddressSourceLineKey]) [dict setObject:[NSNumber numberWithUnsignedInt:iter->second->line] forKey:kAddressSourceLineKey]; @@ -534,7 +534,7 @@ void DumpFunctionMap(const dwarf2reader::FunctionMap function_map) { [dict release]; } - if (![dict objectForKey:kAddressSourceLineKey]) { + if (iter->second.second && ![dict objectForKey:kAddressSourceLineKey]) { [dict setObject:[NSNumber numberWithUnsignedInt:iter->second.second] forKey:kAddressSourceLineKey]; } @@ -1024,6 +1024,12 @@ static BOOL WriteFormat(int fd, const char *fmt, ...) { if ([symbol hasPrefix:@"GCC_except_table"]) continue; + if ([symbol hasPrefix:@"__tcf"]) + continue; + + if ([symbol hasPrefix:@"non-virtual thunk"]) + continue; + // Find the source file (if any) that contains this address while (sourceCount && (addressVal >= nextSourceFileAddress)) { fileIdx = nextFileIdx; -- cgit v1.2.1