Skip to content

Commit 8f83d29

Browse files
authored
Merge pull request #30 from p-x9/feature/objc
Add `objc` command for debugging with objc runtime
2 parents eea3a37 + db5dc61 commit 8f83d29

File tree

3 files changed

+680
-1
lines changed

3 files changed

+680
-1
lines changed

README.md

+96-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# iLLDB
2+
23
LLDB Extension for iOS App Development
34

45
<!-- # Badges -->
@@ -9,6 +10,7 @@ LLDB Extension for iOS App Development
910
[![Github top language](https://img.shields.io/github/languages/top/p-x9/iLLDB)](https://github.com/p-x9/iLLDB/)
1011

1112
## Feature
13+
1214
- [Show view hierarchy](#ui-hierarchy)
1315
- [Easy operation of UserDefaults](#userdefaults)
1416
- [Show device information](#device-info)
@@ -19,11 +21,18 @@ LLDB Extension for iOS App Development
1921
- [Easy operation of HTTP Cookie](#http-cookie)
2022
- [Show Cookie Values](#read-cookie-value)
2123
- [Delete Cookie](#delete-cookie)
24+
- [Objective-C Runtime](#objective-c-runtime)
25+
- [Show inheritance hierarchy of object's class](#show-inheritance-hierarchy-of-objects-class)
26+
- [Show list of methods of object's class](#show-a-list-of-methods-of-objects-class)
27+
- [Show list of properties of object's class](#show-a-list-of-proerties-of-objects-class)
28+
- [Show list of ivars of object's class](#show-a-list-of-ivars-of-objects-class)
2229

2330
## Set up
31+
2432
1. clone this repository
2533
2. Add the following line to ~/.lldbinit
26-
```
34+
35+
```sh
2736
command script import {PATH TO iLLDB}/src/iLLDB.py
2837
```
2938

@@ -343,6 +352,92 @@ optional arguments:
343352
cookie delete --domain example.com --name KEYNAME
344353
```
345354

355+
### Objective-C Runtime
356+
357+
Commands for debugging with Objective-C Runtime
358+
359+
#### Show inheritance hierarchy of object's class
360+
361+
```sh
362+
(lldb) objc inherits -h
363+
usage: inherits
364+
[-h]
365+
object
366+
positional arguments:
367+
object
368+
object
369+
optional arguments:
370+
-h, --help
371+
show this help message and exit
372+
```
373+
374+
##### Example
375+
376+
```sh
377+
(lldb)objc inherits UIWindow()
378+
# NSObject -> UIResponder -> UIView -> UIWindow
379+
```
380+
381+
#### Show a list of methods of object's class
382+
383+
```sh
384+
(lldb) objc methods -h
385+
usage: methods
386+
[-h]
387+
[--class CLASS_NAME]
388+
[-c]
389+
[-i]
390+
object
391+
positional arguments:
392+
object
393+
object
394+
optional arguments:
395+
-h, --help
396+
show this help message and exit
397+
--class CLASS_NAME
398+
Specify a target class in the inheritance hierarchy (default: None)
399+
-c, --class-only
400+
Show only class methods (default: False)
401+
-i, --instance-only
402+
Show only instance methods (default: False)
403+
```
404+
405+
#### Show a list of proerties of object's class
406+
407+
```sh
408+
(lldb) objc properties -h
409+
usage: properties
410+
[-h]
411+
[--class CLASS_NAME]
412+
object
413+
positional arguments:
414+
object
415+
object
416+
optional arguments:
417+
-h, --help
418+
show this help message and exit
419+
--class CLASS_NAME
420+
Specify a target class in the inheritance hierarchy (default: None)
421+
```
422+
423+
#### Show a list of ivars of object's class
424+
425+
```sh
426+
(lldb) objc ivars -h
427+
usage: ivars
428+
[-h]
429+
[--class CLASS_NAME]
430+
object
431+
positional arguments:
432+
object
433+
object
434+
optional arguments:
435+
-h, --help
436+
show this help message and exit
437+
--class CLASS_NAME
438+
Specify a target class in the inheritance hierarchy (default: None)
439+
```
346440

347441
## License
442+
348443
iLLDB is released under the MIT License. See [LICENSE](./LICENSE)

0 commit comments

Comments
 (0)