iOS 4.2.1 越狱 iPhone 3G 无法用 XCode 调试
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4432886/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Jailbroken iPhone 3G with iOS 4.2.1 can't be debugged with XCode
提问by Vitaly S.
I'm trying to debug my applications with XCode 3.2.5 and jailbroken iPhone 3G with iOS 4.2.1.
我正在尝试使用 XCode 3.2.5 和越狱的 iPhone 3G 与 iOS 4.2.1 调试我的应用程序。
When I start debug withenabled breakpoints, application can't start (it stucks on 'Default.png' screen) and I get Data Formatters temporarily unavailable, will re-try after a 'continue'. (Can't find dlopen function, so it is not possible to load shared libraries.)message in GDB.
当我使用启用的断点开始调试时,应用程序无法启动(它停留在“Default.png”屏幕上)并且我的数据格式化程序暂时不可用,将在“继续”后重试。(找不到 dlopen 函数,因此无法加载共享库。)GDB 中的消息。
When I start debug withoutenabled breakpoints, application starts without problems.
当我在没有启用断点的情况下开始调试时,应用程序启动没有问题。
I tried to do steps decribed there, but without any results.
我尝试执行那里描述的步骤,但没有任何结果。
When I used iOS 4.1 there was a problem with reboots.
当我使用 iOS 4.1 时,重新启动时出现问题。
On everyconnect of the iPhone Organiser displays this message:
在iPhone Organizer 的每次连接上都会显示此消息:
**Unknown iOS detected** Xcode does not have debugging information for the version of iOS on the device named “iPhone”. Xcode can collect debugging data from the device to enable development with this version of iOS. This process only needs to be done once per iOS version, and will take several minutes.
**Unknown iOS detected** Xcode does not have debugging information for the version of iOS on the device named “iPhone”. Xcode can collect debugging data from the device to enable development with this version of iOS. This process only needs to be done once per iOS version, and will take several minutes.
Thanks for any help!
谢谢你的帮助!
采纳答案by jlmendezbonini
Jailbroken 3GS / 4.2.1
越狱 3GS / 4.2.1
I tried Matthew Frederick's recommendation without success. Anyone happened to find a solution to this problem?
我尝试了 Matthew Frederick 的推荐,但没有成功。有人碰巧找到了解决此问题的方法吗?
EDIT
编辑
Please note that I used a jailbroken 3GSand a non-jailbroken 3GS. Workaround, requires a non-jailbroken iPhone 3GS with 4.2.1 (8C148a):
请注意,我使用了越狱的3GS和未越狱的3GS。解决方法,需要具有 4.2.1 (8C148a)的未越狱 iPhone 3GS:
- Delete /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148a)
- Connect the non-jailbroken iPhone 3GS with 4.2.1 (8C148a)
- Open Xcode and Organizer
- Configure the new iPhone for development by clicking the "Use for development" button in the Organizer.
- Let it extract the debugging symbols from it recreating /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148a)
- Unplug it, remove from Organizer
- 删除 /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148a)
- 将未越狱的 iPhone 3GS 与 4.2.1 (8C148a) 连接
- 打开 Xcode 和管理器
- 通过单击管理器中的“用于开发”按钮来配置新 iPhone 以进行开发。
- 让它从中提取调试符号,重新创建 /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148a)
- 拔掉它,从管理器中删除
At this point you can debug your jailbroken iPhone again. Cheers!
此时,您可以再次调试越狱的 iPhone。干杯!
回答by Matthew Frederick
It's likely that your problem can be solved by reauthorizing your device:
您的问题很可能可以通过重新授权您的设备来解决:
If your iPhone is plugged into the computer, unplug it
In Xcode, display the Organizer(Window->Organizer)
In the Devicesarea click on your device and delete it.
Just in case, Quit Xcodeand then re-launchit.
Open the Organizer again, then plug your iPhoneinto your computer.
Tell Xcode that yes, you'd like to authorize the device.
If everything works correctly, Xcode will now download device informationfor 4.2.1.
如果您的 iPhone 已插入计算机,请将其拔下
在 Xcode 中,显示 Organizer(Window->Organizer)
在设备区域单击您的设备并将其删除。
以防万一,退出 Xcode,然后重新启动它。
再次打开管理器,然后将 iPhone插入计算机。
告诉 Xcode 是的,您想授权设备。
如果一切正常,Xcode 现在将下载4.2.1 的设备信息。
If this doesn't work then I suggest performing the steps again, but replace step 4 with removing all traces of Xcode from your computer and then reinstalling it. This includes the entire Developer folder.
如果这不起作用,那么我建议再次执行这些步骤,但将步骤 4 替换为从计算机中删除所有 Xcode 痕迹,然后重新安装。这包括整个 Developer 文件夹。
回答by Karoy Lorentey
The latest Xcode+SDK drop doesn't know about iOS 4.2.1, because it was published before the latest patch came out. Xcode's Organizer has a new feature that tries to download debug support files directly from the device, but apparently it has some (possibly jailbreak-related) issues for some people.
最新的 Xcode+SDK drop 不知道 iOS 4.2.1,因为它是在最新补丁出来之前发布的。Xcode 的 Organizer 有一个新功能,它尝试直接从设备下载调试支持文件,但显然它对某些人有一些(可能与越狱相关的)问题。
iOS 4.2.1 is similar enough to 4.2 that Xcode can be coerced to use 4.2 support files to debug on 4.2.1 devices. To do this, simply go to the /Developer/Platforms/iPhoneOS.platform/DeviceSupport
folder and manually copy the Symbols
subfolder and/or the DeveloperDiskImage.*
files from 4.2 (8C134)
to 4.2.1 (8C148)
(or whatever release folder Organizer creates for your device).
iOS 4.2.1 与 4.2 非常相似,可以强制 Xcode 使用 4.2 支持文件在 4.2.1 设备上进行调试。为此,只需转到/Developer/Platforms/iPhoneOS.platform/DeviceSupport
文件夹并手动复制Symbols
子文件夹和/或DeveloperDiskImage.*
文件4.2 (8C134)
到4.2.1 (8C148)
(或管理器为您的设备创建的任何发布文件夹)。
回答by user616925
In order to get rid of (Re)Collecting Debug Symbols in Organizer (which in fact does nothing) each time the iPhone is presented to the XCode, a simple workaround is to copy:
为了在每次将 iPhone 呈现给 XCode 时摆脱(重新)收集管理器中的调试符号(实际上什么都不做),一个简单的解决方法是复制:
DeveloperDiskImage.dmg and DeveloperDiskImage.dmg.signature
DeveloperDiskImage.dmg 和 DeveloperDiskImage.dmg.signature
from the 4.2 (8C134) to the empty 4.2.1 (8C148) folder.
从 4.2 (8C134) 到空的 4.2.1 (8C148) 文件夹。
The XCode will recognize device and you'll be able to debug your code, but without debug symbols for the IOS framework. But, the gdb console will be alive and you can use it do debug your code (with debug symbols).
XCode 将识别设备,您将能够调试您的代码,但没有 IOS 框架的调试符号。但是,gdb 控制台将处于活动状态,您可以使用它来调试您的代码(使用调试符号)。
Btw. you can always use Simulator for the full IOS support :-)
顺便提一句。你总是可以使用模拟器来获得完整的 IOS 支持:-)
回答by Jesse Armand
Additional suggestion besides Fnord's suggestion is to make sure that multitasking, or the "Reenable Functionality" in PwnageTool is not enabled for iPhone 3G jailbroken device.
除了 Fnord 的建议外,其他建议是确保 iPhone 3G 越狱设备不启用多任务处理或 PwnageTool 中的“重新启用功能”。
I'm not sure if this has an effect though. But, it's reasonable to do this if we really want to test it on a real world condition of iPhone 3G.
我不确定这是否有影响。但是,如果我们真的想在 iPhone 3G 的真实世界条件下测试它,那么这样做是合理的。
回答by grahamparks
My completely non-Jailbroken iPhone does this with 4.2.1, and gets exactly the same messages and problems. It's new functionality in the latest version of XCode, so it may well be buggy.
我的完全未越狱的 iPhone 使用 4.2.1 执行此操作,并得到完全相同的消息和问题。这是最新版本的 XCode 中的新功能,所以它很可能有问题。