Hi Carlo,

We had written some stuff for invoking a function from an expression without 
using JIT.
It has not been committed yet. Here’s the review, http://reviews.llvm.org/D4672 
.

This has not been fixed up yet properly, as it has to be refactored to be 
derived from ThreadPlanCallFunction.
Posting it here in case you would like to take a look.

Thanks,
Deepak

On 19 Sep 2014, at 23:16, Greg Clayton <gclay...@apple.com> wrote:

> I just spoke with Jim Ingham and he change my mind. If, every time you stop, 
> you want to call a function, this feature could come in handy.
> 
> Behind the curtains it should:
> - install a ClangFunction down in the host and leave it there so it can be 
> called (we do this internally with a few functions)
> - allow it to be called with a SBValueList. All arguments will need to 
> manually be supplied (the "this", and ObjC "cmd" and "selector" arguments, 
> etc)
> - it should be able to be uninstalled from the target
> 
> 
>> On Sep 19, 2014, at 3:00 PM, Greg Clayton <gclay...@apple.com> wrote:
>> 
>> I would really rather us (LLDB) not get into the the function argument 
>> passing game and leave that to the pros (clang) and just use the expression 
>> parser which does all this for us correctly. 
>> 
>>> On Sep 19, 2014, at 2:05 PM, Carlo Kok <c...@remobjects.com> wrote:
>>> 
>>> On Fri, 19 Sep 2014 21:06:35 +0200, <jing...@apple.com> wrote:
>>> 
>>>> I think it would make more sense to have this be something that hangs off 
>>>> of SBFunction, and have the implementation opaque to the SB API's.  To do 
>>>> that' you're probably going to have to stash the ClangFunction away in the 
>>>> lldb_private::Function, since you can't change the size of SBFunction 
>>>> (another of our API promises...) and it is just one pointer big, so 
>>>> life-time would be hard to manage.
>>>> 
>>>> 
>>> 
>>> yeah, I'll try to look into this next week.
>>> 
>>> For ObjC I'd probably have to cast the right 
>>> msgsend/msgsend_stret/msgsnd_fpret to a function type matching the sig of 
>>> the member function, get the right selector and cache/invoke that, or is 
>>> there a shorter way about this?
>>> 
>>> -- 
>>> Carlo Kok
>>> RemObjects Software
>>> _______________________________________________
>>> lldb-dev mailing list
>>> lldb-dev@cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>> 
>> _______________________________________________
>> lldb-dev mailing list
>> lldb-dev@cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev


_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to