[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re : [Help-smalltalk] Passing a struct to a c-callout
From: |
Mathieu Suen |
Subject: |
Re : [Help-smalltalk] Passing a struct to a c-callout |
Date: |
Fri, 18 Feb 2011 16:26:53 +0000 (GMT) |
Hi
I have break into the #initWithContentRect:styleMask:backing:defer: objective-c
method
and I get the first argument passed as a pointer in $rdx which is wrong since
the method expected to be in the stack (The size of the struct is more than
8byte and the ABI specify that it should be on the stack).
So I have made it explicitly be a struct:
ObjcRuntime class >> specialObjcMsgSend: receiver selector: sel arg1: arg1
args: args [
<cCall: 'objc_msgSend' returning: #cObject args: #( #cObject #cObject
#{NSRect} #variadic )>
]
NSRect being a subclass of CStruct...
But it doesn't work either.
-- Mathieu
----- Message d'origine ----
> De : Holger Hans Peter Freyther <address@hidden>
> À : Mathieu Suen <address@hidden>
> Cc : address@hidden
> Envoyé le : Ven 18 février 2011, 11h 01min 40s
> Objet : Re: Re : Re : [Help-smalltalk] Passing a struct to a c-callout
>
> On 02/18/2011 10:54 AM, Mathieu Suen wrote:
>
> > I do not have error. instead I get those NSlog:
> > 2011-02-18 10:46:56.986 gst[60568:903] NSWindow does not support
>nonactivating
>
> > panel styleMask 0x80
> > 2011-02-18 10:46:56.988 gst[60568:903] NSWindow does not support HUD
>styleMask
>
> > 0x2000
>
> my hint would be start gst. Then attach with gdb to it (gdb -p `pidof gst`)
> and set a breakpoint in this objective c function, then execute your program
> and use gdb to inspect your arguments. Maybe you see a pattern of what is
> going wrong, e.g. the size of the SEL is wrong or such.
>
- [Help-smalltalk] Passing a struct to a c-callout, Mathieu Suen, 2011/02/17
- Re: [Help-smalltalk] Passing a struct to a c-callout, Holger Hans Peter Freyther, 2011/02/17
- Re: [Help-smalltalk] Passing a struct to a c-callout, Mathieu Suen, 2011/02/17
- Re: [Help-smalltalk] Passing a struct to a c-callout, Holger Hans Peter Freyther, 2011/02/17
- Re : [Help-smalltalk] Passing a struct to a c-callout, Mathieu Suen, 2011/02/18
- Re: Re : [Help-smalltalk] Passing a struct to a c-callout, Holger Hans Peter Freyther, 2011/02/18
- Re : Re : [Help-smalltalk] Passing a struct to a c-callout, Mathieu Suen, 2011/02/18
- Re: Re : Re : [Help-smalltalk] Passing a struct to a c-callout, Holger Hans Peter Freyther, 2011/02/18
- Re : [Help-smalltalk] Passing a struct to a c-callout,
Mathieu Suen <=
- Re: Re : [Help-smalltalk] Passing a struct to a c-callout, Holger Hans Peter Freyther, 2011/02/18
- Re : [Help-smalltalk] Passing a struct to a c-callout, Mathieu Suen, 2011/02/18