本文主要介绍介绍三种方式探索alloc源码
1.下断点
按住 control + step into
-
main中的LGPerson处 加一个断点,运行程序,会断在LGPerson位置
image -
按住
control键,选择step into⬇️键,进去后,显示为以下内容
image
2.下符号断点
-
通过符号断点,选择
symbolic Breakpoint
image -
在符号断点中输入
alloc
image
image
3.通过汇编
- 查看汇编的流程:
Debug->Debug Workflow->Always Show Disassembly
image
image
image







