On Mar 8, 2012, at 07:53 , Matt Neuburg wrote: (1) When did LLDB nudge out GDB as the default debugger? It certainly has done so in Xcode 4.3.1, but perhaps this happened in 4.3 and I just didn't notice?
It was 4.3, and Xcode helpfully recommended I start using it. (2) Does this mean LLDB is ready for prime time? The last time I tried to use LLDB it seemed to have a fairly deficient understanding of my code (e.g., it knew nothing of instance variables, kind of a key concept). Also it was missing some features, such as watchpoints.
It's surprisingly robust, this time around. It still has some defects, but no show stoppers like before. I've noticed, for example:
1. It doesn't understand '__attribute__ ((packed))' structs properly, or doesn't understand bit fields properly, or some combination of the two. Trying to display the contents of such a structure produces garbage values for the fields.
2. For some utterly incomprehensible reason, lldb, like gdb before it, fails to acknowledge that object.method is syntactically identical to [object method], and won't make the substitution for you. Apparently it thinks object.property is legal only when the property is an @property, but even then, more often than not, it rejects the dot syntax.
3. What makes #2 matter is that lldb, like gdb before it, is quite happy to deduce the return type of object.method, but refuses to use the runtime information that tells the return type (or at least the size and ABI mechanism of the return type) for [object method].
4. Autocompletion is still pretty borked. In the source editor, if an autocompletion pops up and you press the right arrow, the autocompletion goes away. In lldb, if you press the right arrow, it autocompletes.
Similarly, in the source editor, if an autocompletion pops up, it waits for you to use it. In lldb, it auto-autocompletes after a while. That leads to an awful lot of occasions of trying to 'po [myObject myMethodyMethod]'. I dunno, typing debugger commands seemed *quicker* when there was no autocomplete.
5. There are also some nasty interactions with Xcode. If, during the time Xcode is launching your app and attaching it to lldb, you (say) delete an existing breakpoint by dragging its blue arrow into never-never land, the breakpoint will be gone from Xcode but still in your running app, with no UI for getting rid of it. (Well, I expect you can use debugger commands.) There were a couple of other things that convinced me to adopt this rule: sit on your hands when Xcode is launching your app, and don't touch anything!
Sorry, this turned into a rant. I've generally been much happier with the new lldb.
|