最近下断点总是到 _mh_execute_header + 1905544

最近研究微信,发现断点都是下图这样。开始以为微信有什么黑科技,后来发现任何App都这样。

地址肯定是没错,有遇到类似情况的吗?

最近图片经常不显示,上图内容是:

(lldb) br s -a 0x254788
Breakpoint 1: where = note`_mh_execute_header + 1905544, address = 0x00254788
(lldb) br s -a 0x83c68
Breakpoint 2: where = note`_mh_execute_header + 2152, address = 0x00083c68
  1. debugserver我以为老了,重新从Developer里拿了一个。
  2. 各种折腾……不知道咋啦

例如下面这个位置:

上图内容是:

             -[PDCellFakeView pressDownAnimation]:
0000bc68         push       {r4, r5, r7, lr}                                    ; Objective C Implementation defined at 0x4e93a4 (instance method)
0000bc6a         add        r7, sp, #0x8
0000bc6c         sub        sp, #0x2c
0000bc6e         movw       r1, #0xc384                                         ; :lower16:(0x4c800c - 0xbc88)
0000bc72         movs       r5, #0x0
0000bc74         movt       r1, #0x4b         
(lldb) image list -o -f
[  0] 0x00078000 /private/var/mobile/Containers/Bundle/Application/F34C0788-133A-438C-B808-BB298E44885C/note.app/note(0x000000000007c000)
...

In [5]: hex(0x00078000 + 0x0000bc68)
Out[5]: '0x83c68'

然后就

(lldb) br s -a 0x83c68
Breakpoint 2: where = note`_mh_execute_header + 2152, address = 0x00083c68

这样也找不到

(lldb) br s -F "-[PDCellFakeView pressDownAnimation]"
Breakpoint 3: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.

难道好久不逆向了,哪步忘了………………

(补充上面例子是 锤子便签,找了个简单的App验证)

我用Pixlr试了一下,没有你说的问题:

(lldb) br s -a 0x000000010019bbb0+0x0000000000058000
Breakpoint 1: where = PixlrExpressPlus`-[AppDelegate applicationDidEnterBackground:], address = 0x00000001001f3bb0
Process 14595 stopped
* thread #1: tid = 0x2e305b, 0x00000001001f3bb0 PixlrExpressPlus`-[AppDelegate applicationDidEnterBackground:], queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x00000001001f3bb0 PixlrExpressPlus`-[AppDelegate applicationDidEnterBackground:]
PixlrExpressPlus`-[AppDelegate applicationDidEnterBackground:]:
->  0x1001f3bb0 <+0>:  stp    x20, x19, [sp, #-32]!
    0x1001f3bb4 <+4>:  stp    x29, x30, [sp, #16]
    0x1001f3bb8 <+8>:  add    x29, sp, #16              ; =16 
    0x1001f3bbc <+12>: mov    x19, x0
(lldb)  

debugserver版本340.3.124,LLDB版本360.1.70

我在arm64上是没啥问题的;我看到你是在armv7上做试验,那就不是太清楚了。LLDB和debugserver在armv7上出问题也不是第一次了,有可能确实是bug​:sweat_smile:

多谢多谢。:grinning:
各种测试,目前也猜测是lldb和debugserver的问题,刚放假回家,正准备下载个Xcode7.3.1试试。

我的iPhone5S 9.3.2 lldb和debugserver版本和你一样。Pixlr 也没问题……
但锤子便签和微信都不正常……
再想想……

没有二进制文件吗

我是萌新

啥意思 ?要不有空你也试试 锤子便签?

因为我这里arm64也没问题我不得不怀疑是你脱壳损坏了macho

好,你们没问题也好。肯定是我这的问题了。

在iPhone SE,iOS 9.3.3上测试了一下锤子便签:

Process 2217 stopped
* thread #1: tid = 0x72de0, 0x00000001878e76e0 UIKit`+[UIViewController _performWithoutDeferringTransitions:] + 140, queue = 'com.apple.main-thread', stop reason = instruction step over
    frame #0: 0x00000001878e76e0 UIKit`+[UIViewController _performWithoutDeferringTransitions:] + 140
UIKit`+[UIViewController _performWithoutDeferringTransitions:]:
->  0x1878e76e0 <+140>: bl     0x181a81b80               ; objc_msgSend
    0x1878e76e4 <+144>: b      0x1878e76f4               ; <+160>
    0x1878e76e8 <+148>: ldr    x8, [x19, #16]
    0x1878e76ec <+152>: mov    x0, x19
(lldb) p (char *)$x1
(char *) $0 = 0x0000000187fa7af1 "_setShouldDeferTransitions:"

看上去没啥问题吖……

……
UIKit 我这也可以断点。
只有App自己的类不正常。

先忽略这个问题吧。

我是下在了[AppDelegate application:didFinishLaunchingWithOptions:]上呢

符号没有恢复:joy:
符号没有恢复:joy:
符号没有恢复:joy:

难不成以前微信没有strip?!

strip的问题。。。

这是五个月前的帖子。现在我已经知道了

How time fly → flies

hex(0x00078000 + 0x0000bc68) 这个用的什么工具计算的?

lldb或者计算器

terminal->python