[lldb-dev] [RFC} [Patch] SBFunction::ExecuteFunction (v3)
jingham at apple.com
jingham at apple.com
Mon Oct 13 11:17:24 PDT 2014
This looks good. A couple of trivial things,
1) You make a shared pointer to a ClangFunction:
std::shared_ptr<ClangFunction>& func...
We usually append "_sp" to shared pointers so you can tell that their lifespan is different from ordinary stack objects.
2) Also, when there are errors evaluating the function you return an empty SBValue. But SBValues can have errors (returned with GetError, though only settable on the ValueObject side... Might be nice to set the error for the SBValue rather than just returning an empty one.
3) You have RemoveReusableFunction but it doesn't look like you protected against somebody removing a reusable function while somebody else was using it.
4) SBTypeMemberFunction::ExecuteFunction is explicitly ObjC only. But the name doesn't express that (except that you call the parameter for the implicit object "self") and you don't enforce that self is an ObjC object anywhere. Be good to make that clear.
Jim
> On Oct 13, 2014, at 6:05 AM, Carlo Kok <ck at remobjects.com> wrote:
>
>
> Oke got that figured out. Attached patch works perfectly and stores the cached functions in the Target. I've managed to make the changes in existing classes minimal by creating a ClangFunction subclass.
>
> comments welcome.
>
> --
> Carlo Kok
> RemObjects Software
> <lldb-execute-function-patch3.patch>_______________________________________________
> 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