This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crash on execution of "va_start()"


Doug Broadwell wrote:
> 
> Hi,
> 
> Making cross newlib for m68k-unknown-coff on i686-pc-linux-gnu.  My "Hello
> World!" program is:
> 
> main() {
>     iprintf("Hello World!\n");
> }
> 
> The call to iprintf() dies on the very first line:  "va_start(ap, fmt);".
> It appears that _HAVE_STDC exists so iprintf.c includes stdargs.h instead of
> varargs.h.  In looking at stdargs.h, it appears there is no "va-m68k.h"
> file, is it not necessary?  Any suggestions on how to debug?
> 
> Thanks, Doug Broadwell

Ensure you have #include <stdio.h> in your test case so you know that
the compiler has the correct prototype for the iprintf function call.

How are you compiling, linking, and running your test case?  You want
to make sure you are linking with the correct multilib.

-- Jeff J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]