This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: Calling ioctl with varargs on Linux/FreeBSD AMD64 from Java
- From: Andrew Haley <aph at redhat dot com>
- To: Kustaa Nyholm <Kustaa dot Nyholm at planmeca dot com>
- Cc: "libffi-discuss at sourceware dot org" <libffi-discuss at sourceware dot org>
- Date: Fri, 06 Jul 2012 14:52:19 +0100
- Subject: Re: Calling ioctl with varargs on Linux/FreeBSD AMD64 from Java
- References: <CC1CA2DA.3A022%kustaa.nyholm@planmeca.com>
On 07/06/2012 12:20 PM, Kustaa Nyholm wrote:
> I've been discussing this in the JNA list and Timothy
> Wall, JNA author, suggested that this might be a
> problem how the variable args (for ioctl()) are handled
> by the libffi on AMD64.
>
> Now I'm looking for suggestions, guesses, what ever
> to get me further.... I'm short of things to try and
> investigate.
>
> Is there some way I can, for example, compare how a
> C compiler and JNA/libffi call ioctl()?
Sure, you can just get your debugger (gdb?) to disassemble it.
But the register-passing isn't supposed to be different for varargs
on AMD64, at least on Linux.
Have you got a test case we can try?
Andrew.