iOS逆向工程

文章出处,原创于 http://HawkingOuYang.com/

我的GitHub


GDB 介绍

GDB: The GNU Project Debugger → https://www.gnu.org/software/gdb/

用GDB调试程序 → http://wiki.ubuntu.org.cn/用GDB调试程序

dSYM

Whats the dSYM and how to use it? (iOS SDK) → stackoverflow

GDB 使用

1
➜ ~ ✗ brew install gdb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Last login: Thu Oct 20 13:32:19 on ttys006
➜ ~ git:(文稿+音乐) ✗ symbol-file
zsh: command not found: symbol-file
➜ ~ git:(文稿+音乐) ✗ /Users/OYXJ/Desktop/HomeTime.app.dSYM
➜ HomeTime.app.dSYM git:(文稿+音乐) ✗ l
total 0
drwxr-xr-x@ 3 OYXJ staff 102B 10 19 20:51 .
drwx------@ 44 OYXJ staff 1.5K 10 20 13:30 ..
drwxr-xr-x 4 OYXJ staff 136B 10 19 20:51 Contents
➜ HomeTime.app.dSYM git:(文稿+音乐) ✗ cd Contents
➜ Contents git:(文稿+音乐) ✗ l
total 8
drwxr-xr-x 4 OYXJ staff 136B 10 19 20:51 .
drwxr-xr-x@ 3 OYXJ staff 102B 10 19 20:51 ..
-rw-r--r-- 1 OYXJ staff 648B 10 20 10:41 Info.plist
drwxr-xr-x 3 OYXJ staff 102B 10 19 20:51 Resources
➜ Contents git:(文稿+音乐) ✗ cd Resources
➜ Resources git:(文稿+音乐) ✗
➜ Resources git:(文稿+音乐) ✗ l
total 0
drwxr-xr-x 3 OYXJ staff 102B 10 19 20:51 .
drwxr-xr-x 4 OYXJ staff 136B 10 19 20:51 ..
drwxr-xr-x 3 OYXJ staff 102B 10 19 20:51 DWARF
➜ Resources git:(文稿+音乐) ✗ cd DWARF
➜ DWARF git:(文稿+音乐) ✗
➜ DWARF git:(文稿+音乐) ✗ l
total 22224
drwxr-xr-x 3 OYXJ staff 102B 10 19 20:51 .
drwxr-xr-x 3 OYXJ staff 102B 10 19 20:51 ..
-rw-r--r-- 1 OYXJ staff 11M 10 20 10:41 HomeTime
➜ DWARF git:(文稿+音乐) ✗ gdb HomeTime
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin16.0.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from HomeTime...done.
(gdb) l
1 //
2 // main.m
3 // TemplatesProject
4 //
5 // Created by OYXJ on 15/6/16.
6 // Copyright (c) 2015年 [OYXJlucky@163.com] All rights reserved.
7 //
8
9 #import <UIKit/UIKit.h>
10 #import "AppDelegate.h"
(gdb)

因此不能泄漏 dSYM 文件 !