Lldb中image list中模块基地址都不对怎么办


#1

不知各位有没有遇到过这个现象,

(lldb) image list -o -f
...
[ 3] 0x0000000000cac000 /Users/qt26/Library/Developer/Xcode/iOS DeviceSupport/8.1 (12B411)/Symbols/System/Library/PrivateFrameworks/BulletinBoard.framework/BulletinBoard
[ 4] 0x0000000000cac000 /Users/qt26/Library/Developer/Xcode/iOS DeviceSupport/8.1 (12B411)/Symbols/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
[ 5] 0x0000000000cac000 /Users/qt26/Library/Developer/Xcode/iOS DeviceSupport/8.1 (12B411)/Symbols/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
[ 6] 0x0000000000cac000 /Users/qt26/Library/Developer/Xcode/iOS DeviceSupport/8.1 (12B411)/Symbols/usr/lib/liblockdown.dylib
[ 7] 0x0000000000cac000 /Users/qt26/Library/Developer/Xcode/iOS DeviceSupport/8.1 (12B411)/Symbols/usr/lib/libmis.dylib
[ 8] 0x0000000000cac000 /Users/qt26/Library/Developer/Xcode/iOS DeviceSupport/8.1 (12B411)/Symbols/usr/lib/libtzupdate.dylib
[ 9] 0x0000000000cac000 /Users/qt26/Library/Developer/Xcode/iOS DeviceSupport/8.1 (12B411)/Symbols/usr/lib/libSystem.B.dylib
...

列出来的很多模多基地址都是一样的,而且也是错的。

这种情况该怎么处理,怎么去获得目标模块的正确基地址呢?


#2

一个人都没有么?还是这个问题太傻了……


#3

最上面那个开头的就是。或者 image list -o -f MobileMail(你要看的文件的名字)


#4

我是用的这个方法,关键是lldb返回的基地址是不对的,加上ida里看到的函数指令偏移量后都会出错,像这样:
(lldb) br s -a 0x2677EC2C
warning: failed to set breakpoint site at 0x2677ec2c for breakpoint 1.1: error: 2 sending the breakpoint request
Breakpoint 1: address = 0x000000002677ec2c


#5

没有遇到过这种情况,,但是lldb返回的基地址应该是没错的,你这样验证一下,找一个会调用到的类,http://bbs.iosre.com/t/lldb-oc/6711 这个帖子里看看直接对oc函数下断点。然后对比一下lldb返回的地址看看是不是真的有问题。