Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode 4.5 watchpoints not working

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:

settingssettingssettings

like image 688
Marco83 Avatar asked Nov 09 '12 16:11

Marco83


2 Answers

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.

like image 109
Jason Molenda Avatar answered Nov 12 '22 07:11

Jason Molenda


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.

like image 1
Tom Seddon Avatar answered Nov 12 '22 05:11

Tom Seddon