From: cetoni GmbH - Uwe Kindler <uwe.kindler@cetoni.de>
To: John Dallaway <john@dallaway.org.uk>
Cc: ecos-discuss@sourceware.org
Subject: [ECOS] Re: uSTL hello world
Date: Tue, 08 Sep 2009 15:14:00 -0000 [thread overview]
Message-ID: <4AA6749E.8040908@cetoni.de> (raw)
In-Reply-To: <4A9D2171.30108@dallaway.org.uk>
Hi John,
> Back to the original problem. It may be easiest to drill down into the
> cout call hierarchy under debug and compare with the equivalent call
> stack from a working application in order to narrow the problem search
> space.
>
> John Dallaway
O.k. - I did this and here are my results.
In both situations (reference to printf exists and no reference to
printf exists in main.cpp) the call cout << "Hello world!\n" brings us
into the function readwritev() in fileio/io.cxx. In this file the lines
105 - 108 makes the difference:
fp = cyg_fp_get( fd );
if( fp == NULL )
FILEIO_RETURN(EBADF);
If a printf call is present in main.cpp then cyg_fp_get() returns a
valid file pointer. If no printf call is present in main.cpp the
cyg_fp_get() returns 0 and the function returns with EBADF.
Here are the local variables in readwritev() with printf:
fd 0x1
_iov 0xa0140948
iov_len 0x1
direction 0x2
cnt 0xd
len 0xd
ret 0x11110008
_idx 0x1
fp 0xa0140d90
iov 0xa014086c
uio {...}
op 0xa014095c
and here are the locals in readwritev() without printf in main:
fd 0x1
_iov 0xa013d5e8
iov_len 0x1
direction 0x2
cnt 0x11110006
len 0xd
ret 0x11110008
_idx 0x1
fp 0x00000000
iov 0xa013d50c
uio {...}
op 0xa013d5fc
Any idea what is going wrong here before I dig even more deeper?
Regards, Uwe
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2009-09-08 15:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 15:22 [ECOS] " John Dallaway
2009-09-01 8:36 ` [ECOS] " cetoni GmbH - Uwe Kindler
2009-09-01 9:03 ` John Dallaway
2009-09-01 12:22 ` cetoni GmbH - Uwe Kindler
2009-09-01 13:28 ` John Dallaway
2009-09-08 15:14 ` cetoni GmbH - Uwe Kindler [this message]
2009-09-08 15:59 ` John Dallaway
2009-09-09 7:00 ` cetoni GmbH - Uwe Kindler
2009-09-09 11:55 ` John Dallaway
2009-09-10 0:32 ` Jonathan Larmour
2009-09-11 19:25 ` Bart Veer
2009-09-12 2:49 ` Jonathan Larmour
2009-09-29 14:28 ` Bart Veer
2009-09-29 15:36 ` Jonathan Larmour
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AA6749E.8040908@cetoni.de \
--to=uwe.kindler@cetoni.de \
--cc=ecos-discuss@sourceware.org \
--cc=john@dallaway.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).