I'm trying to debug C++ code in Xcode 4.5 on iOS, running the app on a connected iPad 2.

I set a regular breakpoint on my code, and when I hit it, I look at my Local variables, click on a variable and select "Watch xxxxx".

The lldb console shows:

error: failed to create watchpoint for m_step

Same result if I try to set it by hand in the console, with the command:

w s v xxxxx

I get:

error: Wathpoint creation failed (addr=0x..... size=4) error: sending gdb watchpoint packet failed

I'm running with a debug configuration, using LLDB. Any clue whether there is something else I should check?

EDIT: here are my settings:

settings settings settings

有帮助吗?

解决方案

What iOS is your iPad 2 running? Watchpoint support requires a debug server included in iOS 6, not earlier versions. It sounds like the debug server running on your device does not have watchpoint support. The device-side debug server is fixed with the iOS build, it doesn't get updated by Xcode. Watchpoint support in Xcode 4.5 involved changes to both the device-side debug server (in iOS 6) and changes to lldb in Xcode on the Mac. Both sides are required for this feature.

其他提示

The latest Xcode release notes says that Xcode 4.5 supports them.

https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/00-Introduction/Introduction.html

Well... so what? (That's a rhetorical question, by the way.) I couldn't get watchpoints to work on Xcode 4.5 either! I suspect they just don't work. Still.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top