public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "yufeng.zhang at arm dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug testsuite/14531] gdb.base/dprintf.exp fails in newlib environment
Date: Tue, 18 Sep 2012 09:49:00 -0000	[thread overview]
Message-ID: <bug-14531-4717-CTNOZsYQ2x@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-14531-4717@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=14531

--- Comment #3 from Yufeng Zhang <yufeng.zhang at arm dot com> 2012-09-18 09:49:03 UTC ---
(In reply to comment #1)
> Maybe we can do 'set dprintf-channel _impure_ptr->_stderr' for newlib??

This is not ideal solution as 'stderr' is not always _impure_ptr->_stderr in
newlib; see newlib/libc/include/stdio.h:

#ifndef _REENT_ONLY
#define stdin   (_REENT->_stdin)
#define stdout  (_REENT->_stdout)
#define stderr  (_REENT->_stderr)
#else /* _REENT_ONLY */
#define stdin   (_impure_ptr->_stdin)
#define stdout  (_impure_ptr->_stdout)
#define stderr  (_impure_ptr->_stderr)
#endif /* _REENT_ONLY */

(In reply to comment #2)
> How about adding a function like 
> 
>  FILE *get_stderr () { return stderr; }
> 
> to the test's .c file, and do 
[snip]

Sound like a good idea!

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


      parent reply	other threads:[~2012-09-18  9:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 17:31 [Bug testsuite/14531] New: " yufeng.zhang at arm dot com
2012-09-08 14:39 ` [Bug testsuite/14531] " qiyao at gcc dot gnu.org
2012-09-10 13:27 ` palves at redhat dot com
2012-09-18  9:49 ` yufeng.zhang at arm dot com [this message]

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=bug-14531-4717-CTNOZsYQ2x@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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).