[lldb-dev] Inspecting local variables whose name collides with a built-in LLDB type

jingham at apple.com jingham at apple.com
Wed Jul 9 11:04:57 PDT 2014


We have a bug on our end for being able to compile expressions in any language flavor (C, ObjC, C++, ObjC++), but not in Bugzilla.  Feel free to file one.  

Currently we always run the expression parser using the ObjC++ language, though that's not strictly required.  The expression parser uses some C++ features to capture the persistent variables ($var) defined in the course of the expression evaluation, so we can't back down to pure C without doing a fair bit of surgery.  But it should be possible to do just C++.  That would get you "id", though not much more.

Jim


> On Jul 9, 2014, at 9:54 AM, Bobby Holley <bholley at mozilla.com> wrote:
> 
> Hi,
> 
> I use LLDB (lldb-310.2.37) to debug Firefox/Gecko. One of my biggest annoyances is that I can't seem to make it inspect a local variable called 'id' (of which we have many) because 'id' is the name of a built-in LLDB type.
> 
> (lldb) p id
> (lldb) p id.get()
> error: cannot use dot operator on a type
> error: 1 errors parsing expression
> 
> I can't seem to find a bug on this - is there one on file? More importantly, is there some escaping mechanism I can use as a workaround?
> 
> Thanks,
> bholley
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev




More information about the lldb-dev mailing list