This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: Crash on execution of "va_start()"
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: Doug Broadwell <dougb at value dot net>
- Cc: Newlib Mail List <newlib at sources dot redhat dot com>,William A Gatliff <bgat at billgatliff dot com>
- Date: Thu, 03 Oct 2002 17:53:32 -0400
- Subject: Re: Crash on execution of "va_start()"
- Organization: Red Hat Inc.
- References: <001f01c26b1b$f4985c30$3cfea8c0@dba03>
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.