Mac之SenTestingKit中的设计模式
摘要:【Mac之SenTestingKit中的设计模式】 1、模板模式。 SenTest、SenTestRun分别提供了基类方法,让各自的子类(SenTestCase、SenTestRun)去实现。此为模板模式。 2、组合模式。 SenTestCase、SenTestSuit继承于SenTest,而SenTestSuit内含SenTest指针list。此为组合模式。组合模式提供多级目录式的牛X功能。 3、策略模式。 SenTest中饮食一个SenTestRun指针,可以用于指向不同类型的SenTestRun子类。此为策略模式。 4、桥模式。 SenTest作为基类,提供统一接口,让子类实现,...
阅读全文
Mac之Darwin
摘要:【Mac之Darwin】 1、The kernel, along with other core parts of OS X are collectively referred to asDarwin.。 Mac OS X的kernel,以及其它几个核心组件,也被统称为Darwin。Darwin是2000年苹果开源的一个类Unix操作系统。So,意即,Mac OS X构建于Darwin技术之上。 Darwin does not include Apple’s proprietary graphics or applications layers, such as Quartz, Qu...
阅读全文
bundle之principal class
摘要:【bundle之principal class】 In particular, every Cocoa loadable bundle contains aprincipal class. The code loading mechanism provided by the NSBundle class uses a bundle’s principal class as an entry point. Applications loading bundles can ask NSBundle to find the principal class and use the returnedC.
阅读全文
iOS之Framework
摘要:【iOS之Framework】 1、Aframeworkis a hierarchical directory that encapsulates a dynamic shared library and the resource files needed to support that library. framework,所包含的必然是一个dylib。 2、Accounts.framework实例: 可以看到,大多数framework都是一个dylib+headers。所以在osx/ios中,通常没有单独的dylib存在(一个没有给出导出符号的dylib,对大数用户来说都没用),每...
阅读全文
linux之GCC&C++Runtime版本编译期检查
摘要:【linux之GCC&C++Runtime版本编译期检查】 1、官方开发文档如下: 2、But how to use this feature in real development? I don't know at present.
阅读全文
Mac之Font管理
摘要:【Mac之Font管理】 1、常常需要确定当前系统到底有多少字体可用,OSX已经为我们开发了专门的应用来帮助管理字体。 LaunchPad -> 其它 -> Font Book。 2、通过Font Book可以查看到系统当前有多少字体,以及查找到系统存放字体的路径。
阅读全文
什么是dmg?
摘要:【什么是dmg?】 .dmg是Mac机用的一种文件格式。 dmg就是disk image的意思,即磁盘影像,相当于在windows上常见的iso文件。 假如你在网上下载了一个dmg文件,双击它,你就会发现系统多了一个磁盘。这个磁盘就是刚才双击的dmg文件所包含的内容。 同时,用户可以在程序-常用工具-磁盘工具里面创建,大小自己定义的dmg文件,用来放程序,文件打包,或用来做一个限定容量的路径。然后你可以对这个磁盘做你要做的事情,如用TOAST刻录。因此说,dmg文件在Mac中又相当于一个软U盘。 dmg文件是mac系统的安装文件,相当于win的setup.exe,win系统无法安装,该下ex.
阅读全文
Mac之DTerm
摘要:【Mac之DTerm】 DTerm是一个Mac下的好用的终端。相比Mac自带的Terminal,有以下强大之处: 1、随时通过Command+Shit+Enter唤起窗口,方便。 2、DTerm在唤醒时会按当前工作目录设置好路径,方便。 3、此外炫酷的外型也是DTerm的一大亮点,界面爽。...
阅读全文
plutil检查plist语法
摘要:【plutil检查plist语法】 plutil是从Mac OX10.2开始系统自带的一个工具,用于检测plist语法以及将plist转换成xml、binary、json用。 plutil用法如下:
阅读全文
Mac之理解Call&Ret
摘要:【Mac之理解Call&Ret】 1、对于下述代码: 产生的汇编指令是: 2、由上例可以总结出 1)函数返回值使用eax。 3、调用约定 4、调用实例展示 解析如下:
阅读全文
Mac- i386 Operands and Addressing Modes
摘要:【Mac- i386 Operands and Addressing Modes】 The i386 architecture uses four kinds of instruction operands:Register:Register operands specify that the value stored in the named register is to be used by the operator.Immediate:Immediate operands are constant values specified in assembler code.Direct Me.
阅读全文
Mac - i386 Registers
摘要:【Mac - i386 Registers】Registers Many instructions accept registers as operands. The OS X assembler for Intel i386 processors always uses names beginning with a percent sign (‘%’) for registers, so naming conflicts with identifiers aren’t possible; further, all register names are in lowercase letter.
阅读全文
What is stabs?
摘要:【What is stabs?】 The name stabs comes from symbol table strings, since the debugging data were originally saved as strings in Unix’s a.out object file’s symbol table. Stabs encodes the information about a program in text strings. Initially quite simple, stabs has evolved over time into a quite
阅读全文
Mac之debuging symbol
摘要:【Mac之debuging symbol】 1、Overview Adebugging symbolis a symbol generated by the compiler that allows the debugger to map from addresses in machine code to locations in source code. The standard compilers generate debugging symbols using either the Stabs format or the DWARF format (supported in Xcode.
阅读全文
Executing Mach-O Files
摘要:【Executing Mach-O Files】 1、Overview The process of loading and linking a program in OS X mainly involves two entities: the OS X kernel and the dynamic linker. When you execute a program, the kernel creates a process for the program, and loads the program and the dynamic linker shared library, usual.
阅读全文
Mac之Two-Level Namespace
摘要:【Mac之Two-Level Namespace】
阅读全文
Mac之常用Command
摘要:【Mac之常用Command】 1、ar - archive utility, be used to operate universery file. 2、otool - be used to analysis objective-c from Mach-O file. 3、libtool - creates either static archive libraries or dynamic shared libraries. You can use thelibtoolcommand to build a static archive library, and you can use t.
阅读全文
Mac之Binding Symbols
摘要:【Mac之Binding Symbols】 1、what is binding? 2、The dynamic linker can bind a program at several stages during loading and execution, depending on the options you specify at build time: attention: just-in-time binding is the default value.
阅读全文
Mac之Linker
摘要:【Mac之Linker】 1、static linker static linker is used to compose object file into final file. 2、dynamic linker dynamic linker used to load shared library that the programe based on.
阅读全文
位置无关代码
摘要:【位置无关代码】 1、起因 2、解决 为了避免这种情况,共享库使用了位置无关代码(PIC:Position Independnet Code), 这是无论被加载到内存中的任何位置都可以正常工作的代码。共享库中的代码通常都是位置无关代码,这样代码可以以 RO 方式映射。数据页仍然带有需要被重定位的指针,但由于数 据页将以 COW 方式映射,因此这里对共享不会有什么损失。
阅读全文