Re: Variable function arguments and the stack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ Charset ISO-8859-1 unsupported, converting... ]
> Robert Kiesling wrote:
> > I trying to write a function that calls libc functions with
> > variable arguments - for example, scanf.  I would like to do
> > this by pushing the arguments onto the stack and then calling 
> > the function, something like this.  (This code is for an x86
> > machine.)
> > 
> > static long long int scalar_args[512];
> > static char *ptr_args[512][BUFSIZE];
> 
> Use libffi which ships with GCC.  Doing things like this is what it was 
> designed for.

Thanks - the library looks like it should work very nicely.  

Robert Kiesling

-- 
Ctalk Home Page: http://www.ctalklang.org/


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux