Fwd: [squeak-dev] Re: Debug-it and external calls

Andreas Raab andreas.raab at gmx.de
Mon Jul 19 20:43:58 UTC 2010


On 7/19/2010 1:10 PM, Schwab,Wilhelm K wrote:
> If the FFI call is flawed, why does it work when not stepping in the debugger?  I'm not buying it :)

Good question. Does it work for you when using Squeak 4.1?

Cheers,
   - Andreas

> -----Original Message-----
> From: pharo-project-bounces-bM+ny+RY8h+a+bCvCPl5/gCzwTLBPCX0 at public.gmane.org [mailto:pharo-project-bounces-bM+ny+RY8h+a+bCvCPl5/gCzwTLBPCX0 at public.gmane.org] On Behalf Of Igor Stasenko
> Sent: Monday, July 19, 2010 3:02 PM
> To: Pharo Development
> Subject: [Pharo-project] Fwd: [squeak-dev] Re: Debug-it and external calls
>
> ---------- Forwarded message ----------
> From: Igor Stasenko<siguctua-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
> Date: 19 July 2010 23:00
> Subject: Re: [squeak-dev] Re: [Pharo-project] Debug-it and external calls
> To: The general-purpose Squeak developers list<squeak-dev-bD51WKytQuJI8mQ4nJOOfw at public.gmane.orgdation.org>
>
>
> On 19 July 2010 21:42, Andreas Raab<andreas.raab-Mmb7MZpHnFY at public.gmane.org>  wrote:
>> On 7/19/2010 9:29 AM, Igor Stasenko wrote:
>>>
>>> No, debugger, actually doing a primitive call, but in order to
>>> intercept a primitive failure and 'step into' method, it does the
>>> trick with replacing the subject method with temporary method (which
>>> will call the same primitive with same arguments&    recevier).
>>> Then, if primitive runs ok, it simply behaves as a 'step over', and
>>> if primitive fails, then debugger itercepts it and creates a context
>>> for subject method, which should handle primitive failure.
>>
>> Correct. Stepping over FFI calls will only fail if the FFI call
>> actually fails. So whatever the problem it's somewhere in your FFI call.
>>
> But! The problem which i discovered not long ago, that if FFI method contains many arguments (close to max 15), then debugger is unable to invoke it, because #perform:... method works in a way, that its using temps of context, where it were invoked. I fixed it by setting a #perform method's frame to be a large one.
>
>
> See http://bugs.squeak.org/view.php?id=7534
>
>> Cheers,
>>   - Andreas
>>
>>> On 19 July 2010 19:22, Schwab,Wilhelm K<bschwab-ZyIy6kptTSJkZI0wD67Jjg at public.gmane.org>    wrote:
>>>>
>>>> So the external call does not happen and the fall-back code executes.
>>>>   That explains it.  It might be nice if FFI calls could be made to
>>>> happen, or at least to have a more informative error message, such
>>>> as "Primitive not executed by the debugger" rather than "Unable to find function address."
>>>>
>>>> Bill
>>>>
>>>>
>>>>
>>>>
>>>> ________________________________________
>>>> From: pharo-project-bounces-bM+ny+RY8h+a+bCvCPl5/gCzwTLBPCX0 at public.gmane.org
>>>> [pharo-project-bounces-bM+ny+RY8h+a+bCvCPl5/gCzwTLBPCX0 at public.gmane.org] On Behalf Of Levente
>>>> Uzonyi [leves-X9Un+BFzKDI at public.gmane.org]
>>>> Sent: Monday, July 19, 2010 12:20 PM
>>>> To: Pharo-project-bM+ny+RY8h+a+bCvCPl5/gCzwTLBPCX0 at public.gmane.org
>>>> Subject: Re: [Pharo-project] Debug-it and external calls
>>>>
>>>> On Mon, 19 Jul 2010, Schwab,Wilhelm K wrote:
>>>>
>>>>> I often (not always??) find that using the Debug-it command and
>>>>> debugging into an external call (FFI) leads to a false claim of
>>>>> "Unable to find function address."  Stepping over the call works;
>>>>> stepping into it make it look like it fails.
>>>>>
>>>>> I am curently using a 1.1 RC2 image and the 4.0.3 vm on Ubuntu.  I
>>>>> cannot easily move the offending code to Windows, nor do I
>>>>> particularly care to do so (feels good<g>), and FFI is fairly uncommon in Squeak/Pharo.
>>>>>
>>>>> Can anyone else tinker with this to see if it is real?
>>>>
>>>> IIRC when you're using the debugger, primitives are not evaluated.
>>>>
>>>>
>>>> Levente
>>>>
>>>>>
>>>>> Bill
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> Pharo-project-bM+ny+RY8h+a+bCvCPl5/gCzwTLBPCX0 at public.gmane.org
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project-bM+ny+RY8h+a+bCvCPl5/gCzwTLBPCX0 at public.gmane.org
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project-bM+ny+RY8h+a+bCvCPl5/gCzwTLBPCX0 at public.gmane.org
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project




More information about the Squeak-dev mailing list