public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] sprintf problem
@ 2001-01-08 22:40 Narayanan, Anita (CTS)
  2001-01-09 10:17 ` Jonathan Larmour
  0 siblings, 1 reply; 2+ messages in thread
From: Narayanan, Anita (CTS) @ 2001-01-08 22:40 UTC (permalink / raw)
  To: ecos-discuss

hi!

Iam running an eCos code which uses sprintf() function with i386PC both as
the host as well as the target machine. 

There is no problem with the sprintf() function when i copy a const char.
for  eg. 
sprintf(buf,"TYPE");

But the code gives a segmentation violation error at the sprintf() function
whenever i try to copy a variable value into some buffer. 
for eg.
sprintf(buf,"%d TYPE", m_type);


Has anybody encountered such a problem with sprintf() function with i386 as
the target machine? If so, can you kindly help us to resolve the issue?

regards
anita


This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

		Visit us at http://www.cognizant.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] sprintf problem
  2001-01-08 22:40 [ECOS] sprintf problem Narayanan, Anita (CTS)
@ 2001-01-09 10:17 ` Jonathan Larmour
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2001-01-09 10:17 UTC (permalink / raw)
  To: Narayanan, Anita (CTS); +Cc: ecos-discuss

"Narayanan, Anita (CTS)" wrote:
> But the code gives a segmentation violation error at the sprintf() function
> whenever i try to copy a variable value into some buffer.
> for eg.
> sprintf(buf,"%d TYPE", m_type);
> 
> Has anybody encountered such a problem with sprintf() function with i386 as
> the target machine? If so, can you kindly help us to resolve the issue?

I haven't. What happens if you run the eCos tests sprintf1 and sprintf2?

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-01-09 10:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-08 22:40 [ECOS] sprintf problem Narayanan, Anita (CTS)
2001-01-09 10:17 ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).