This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

RE: Libgloss and stdio



On 26-Jun-97 Jeffrey A. Webb wrote:
> I can use the inbyte, outbyte, read, write, and print routines from my
> main program with no problem.  When I try to use stdio functions,
> everything compiles and links fine, but the program always hangs
> whenever it gets to the putchar or printf.

Have you provided a proper sbrk()?  The stdio package allocates it's
buffers using malloc the first time you use one of the stdio functions.

You can do basic debugging by writing very noddy print functions that use
write() directly. Then delve into the stdio sources and scatter your prints
around to see where it gets stuck.


---
Mark Powell, Senior Software Engineer, Primagraphics Limited
New Cambridge House, Litlington, nr.Royston, Herts, SG8 0SS, UK
Tel. +44 1763 852222, Fax. 853324, medp@primag.co.uk, http://www.primag.co.uk