Debug @yarshure
Debug@yarshure
自我介绍
Unix System Admin
Coder(Python/C)
Apple Developer
Core Animation Speech
agenda
iOS Application launch
静态/动态分析
调试
发布之后
应用程序启动过程
分析工具
file determine file type
strings find the printable strings in a object, or other binary, file
otool object file displaying tool
class-dump examining the Objective-C runtime information stored in Mach-O files
nm display name list (symbol table)
Xcode项目编译
xcodebuild -- build Xcode projects
gcc,clang, dsymutil, lipo,libtool,install_name_tool
codesign -- Create and manipulate code signatures
Xcode项目编译
PackageApplication prepare an application for submission to AppStore or installation by iTunes.
productbuild/productsign -- Build deployable product from Mac OS X Installer packages.
Build log
$ cd /Users/yarshure/Documents/WIFIKey/$ xcodebuild
静态分析: LLVM/Clang Static Analyzer
动态runingNSLog,printf
标准输出重定向
条件编译, 著名软件Release版也print Logfreopen( p, "w", stdout);
#ifdef DEBUG# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);#else# define DLog(...)
紧急情况
IPCU(支持Win)
UncaughtExceptions
EXC_BAD_ACCESS is a Mach exception sent by the kernel to your application when you try to access memory that is not mapped for your application. If not handled at the Mach level, it will be translated into a SIGBUS or SIGSEGV BSD signal.
SIGABRT is a BSD signal sent by an application to itself when an NSException or obj_exception_throw is not caught.
UncaughtExceptions
http://cocoawithlove.com/2010/05/handling-unhandled-exceptions-and.html
debug
运行选项
断点
重要
新的旅程
终端
/Developer/usr/bin/lldb
Crash Reports
network Tools
推荐资源
WWDC11 123
WWDC11 319
WWDC11 321