Hi all,

The following code fails when asking lldb to run the command "(lldb) expr id"
    int main() {
        int id = 4;
        return 0;
    }

The reason is because lldb tries to evaluate the expression as Objective C++, rather than C. And in Objective C++, "id" is a builtin type, and so conflicts with our local variable.

I'm thinking the correct fix is to evaluate expressions in the language of the current scope, but I just wanted to throw this out there and check before I go off and try to fix it.

One possible problem of using the current scope's language is that if you had a program that mixed languages (e.g. C++ and ObjC in different files), you wouldn't be able to evaluate any ObjC expressions while you were in a C++ function.

--
Richard Mitton
[email protected]

_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to