程序计数器、反汇编工具

objdump -d  CashCompass:工具集合

源码:

-(void)updateHomeData

{

kWeakObject(self);

self.apiModel = [NSClassFromString(@"CCHomePageModel") new];

//self.apiModel.showLoading = YES;

[self.apiModel startRequestWithCallBack:^(id response) {

if(weakObject.apiModel.respSuccess)

{

[weakObject.homeTableView reloadData];

}

[weakObject.homeTableView.mj_header endRefreshing];

}];

}

反汇编:

-[CCHomeViewControler updateHomeData]:

100231bbc: ff c3 02 d1 sub sp, sp, #176

100231bc0: fd 7b 0a a9 stp x29, x30, [sp, #160]

100231bc4: fd 83 02 91 add x29, sp, #160

100231bc8: a0 83 1f f8 stur x0, [x29, #-8]

100231bcc: a1 03 1f f8 stur x1, [x29, #-16]

100231bd0: a1 83 5f f8 ldur x1, [x29, #-8]

100231bd4: a0 63 00 d1 sub x0, x29, #24

100231bd8: bd 81 08 94 bl #2230004

100231bdc: a1 83 5f f8 ldur x1, [x29, #-8]

100231be0: 5e 17 00 f0 adrp x30, #3059712

100231be4: de 83 07 91 add x30, x30, #480

100231be8: e0 23 00 f9 str x0, [sp, #64]

100231bec: e0 03 1e aa mov x0, x30

100231bf0: e1 1f 00 f9 str x1, [sp, #56]

100231bf4: 23 7e 08 94 bl #2226316

100231bf8: e0 1b 00 f9 str x0, [sp, #48]

100231bfc: 01 00 00 14 b #4

100231c00: 48 1e 00 90 adrp x8, #3964928

100231c04: 01 3d 44 f9 ldr x1, [x8, #2168]

100231c08: e0 1b 40 f9 ldr x0, [sp, #48]

100231c0c: bf 81 08 94 bl #2230012

100231c10: e0 17 00 f9 str x0, [sp, #40]

100231c14: 01 00 00 14 b #4

100231c18: 68 1e 00 90 adrp x8, #3981312

100231c1c: 01 59 41 f9 ldr x1, [x8, #688]

100231c20: e0 1f 40 f9 ldr x0, [sp, #56]

100231c24: e2 17 40 f9 ldr x2, [sp, #40]

100231c28: b8 81 08 94 bl #2229984

100231c2c: 01 00 00 14 b #4

100231c30: e0 17 40 f9 ldr x0, [sp, #40]

100231c34: be 81 08 94 bl #2230008

100231c38: 08 00 80 52 mov w8, #0

100231c3c: e8 3f 01 39 strb w8, [sp, #79]

100231c40: e0 43 01 91 add x0, sp, #80

100231c44: 00 80 00 91 add x0, x0, #32

100231c48: be 83 5f f8 ldur x30, [x29, #-8]

100231c4c: 69 1e 00 90 adrp x9, #3981312

100231c50: 21 5d 41 f9 ldr x1, [x9, #696]

100231c54: e0 13 00 f9 str x0, [sp, #32]

100231c58: e0 03 1e aa mov x0, x30

100231c5c: ab 81 08 94 bl #2229932

100231c60: e0 0f 00 f9 str x0, [sp, #24]

100231c64: 01 00 00 14 b #4

100231c68: fd 03 1d aa mov x29, x29

100231c6c: e0 0f 40 f9 ldr x0, [sp, #24]

100231c70: bb 81 08 94 bl #2229996

100231c74: fe 03 00 aa mov x30, x0

100231c78: 48 16 00 f0 adrp x8, #2928640

100231c7c: 08 79 41 f9 ldr x8, [x8, #752]

100231c80: e8 2b 00 f9 str x8, [sp, #80]

100231c84: 09 40 b8 52 mov w9, #-1040187392

100231c88: e9 5b 00 b9 str w9, [sp, #88]

100231c8c: 09 00 80 52 mov w9, #0

100231c90: e9 5f 00 b9 str w9, [sp, #92]

100231c94: 08 00 00 90 adrp x8, #0

100231c98: 08 61 35 91 add x8, x8, #3416

100231c9c: e8 33 00 f9 str x8, [sp, #96]

100231ca0: c8 16 00 b0 adrp x8, #2985984

100231ca4: 08 61 07 91 add x8, x8, #472

100231ca8: e8 37 00 f9 str x8, [sp, #104]

100231cac: e8 43 01 91 add x8, sp, #80

100231cb0: 0a 81 00 91 add x10, x8, #32

100231cb4: a1 63 00 d1 sub x1, x29, #24

100231cb8: e0 0b 00 f9 str x0, [sp, #16]

100231cbc: e0 03 0a aa mov x0, x10

100231cc0: e8 07 00 f9 str x8, [sp, #8]

100231cc4: fe 03 00 f9 str x30, [sp]

100231cc8: 5a 81 08 94 bl #2229608

100231ccc: e9 03 00 32 orr w9, wzr, #0x1

100231cd0: e9 3f 01 39 strb w9, [sp, #79]

100231cd4: 68 1e 00 90 adrp x8, #3981312

100231cd8: 01 61 41 f9 ldr x1, [x8, #704]

100231cdc: e0 0b 40 f9 ldr x0, [sp, #16]

100231ce0: e2 07 40 f9 ldr x2, [sp, #8]

100231ce4: 89 81 08 94 bl #2229796

100231ce8: 01 00 00 14 b #4

100231cec: e0 03 40 f9 ldr x0, [sp]

100231cf0: 8f 81 08 94 bl #2229820

100231cf4: e0 13 40 f9 ldr x0, [sp, #32]

100231cf8: 51 81 08 94 bl #2229572

100231cfc: a0 63 00 d1 sub x0, x29, #24

100231d00: 4f 81 08 94 bl #2229564

100231d04: fd 7b 4a a9 ldp x29, x30, [sp, #160]

100231d08: ff c3 02 91 add sp, sp, #176

100231d0c: c0 03 5f d6 ret

100231d10: e8 03 01 aa mov x8, x1

100231d14: a0 03 1e f8 stur x0, [x29, #-32]

100231d18: a8 c3 1d b8 stur w8, [x29, #-36]

100231d1c: 0a 00 00 14 b #40

100231d20: e8 03 01 aa mov x8, x1

100231d24: a0 03 1e f8 stur x0, [x29, #-32]

100231d28: a8 c3 1d b8 stur w8, [x29, #-36]

100231d2c: e8 3f 41 39 ldrb w8, [sp, #79]

100231d30: 08 01 00 12 and w8, w8, #0x1

100231d34: 68 00 00 36 tbz w8, #0, #12

100231d38: e0 13 40 f9 ldr x0, [sp, #32]

100231d3c: 40 81 08 94 bl #2229504

100231d40: 01 00 00 14 b #4

100231d44: a8 63 00 d1 sub x8, x29, #24

100231d48: e0 03 08 aa mov x0, x8

100231d4c: 3c 81 08 94 bl #2229488

100231d50: a0 03 5e f8 ldur x0, [x29, #-32]

100231d54: 60 7f 08 94 bl #2227584

函数调用栈:

* thread #1, queue = \'com.apple.main-thread\', stop reason = breakpoint 1.1

* frame #0: 0x000000010599c060 CashCompass`-[CCHomeViewControler updateHomeData](self=0x00007ffcc6e0a690, _cmd="updateHomeData") at CCHomeViewControler.m:67

frame #1: 0x000000010599cefc CashCompass`__38-[CCHomeViewControler configTableView]_block_invoke((null)=<unavailable>) at CCHomeViewControler.m:153

frame #2: 0x00000001058b0fbb CashCompass`__47-[MJRefreshComponent executeRefreshingCallback]_block_invoke((null)=<unavailable>) at MJRefreshComponent.m:233

frame #3: 0x000000010f9d23f7 libdispatch.dylib`_dispatch_call_block_and_release + 12

frame #4: 0x000000010f9d343c libdispatch.dylib`_dispatch_client_callout + 8

frame #5: 0x000000010f9de6f0 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 628

frame #6: 0x0000000109867ef9 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9

frame #7: 0x000000010982c662 CoreFoundation`__CFRunLoopRun + 2402

frame #8: 0x000000010982ba89 CoreFoundation`CFRunLoopRunSpecific + 409

frame #9: 0x000000010f3789c6 GraphicsServices`GSEventRunModal + 62

frame #10: 0x000000010af32d30 UIKit`UIApplicationMain + 159

frame #11: 0x000000010599bd9f CashCompass`main(argc=1, argv=0x00007fff5a4c4188) at main.m:14

frame #12: 0x000000010fa4fd81 libdyld.dylib`start + 1

frame #13: 0x000000010fa4fd81 libdyld.dylib`start + 1

其他示例:

int bar(int c, int d) { int e = c + d; return e; } int foo(int a, int b) { return bar(a, b); } int main(void) { foo(2, 5); return 0; }

main函数

现进程跑在main函数中,我们disassemble命令显示当前函数的汇编信息:

复制代码

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zgfzpy.html