From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9704 invoked by alias); 10 Sep 2012 13:27:39 -0000 Received: (qmail 9679 invoked by uid 22791); 10 Sep 2012 13:27:39 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Sep 2012 13:27:27 +0000 From: "palves at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug testsuite/14531] gdb.base/dprintf.exp fails in newlib environment Date: Mon, 10 Sep 2012 13:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: palves at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q3/txt/msg00336.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14531 Pedro Alves changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |palves at redhat dot com --- Comment #2 from Pedro Alves 2012-09-10 13:27:13 UTC --- How about adding a function like FILE *get_stderr () { return stderr; } to the test's .c file, and do set dprintf-function fprintf set dprintf-channel get_stderr() instead of set dprintf-function fprintf set dprintf-channel stderr IOW, avoid the need of macro debug info for all targets. AFAICS, the code does: else if (strcmp (dprintf_style, dprintf_style_call) == 0) { if (!dprintf_function) error (_("No function supplied for dprintf call")); if (dprintf_channel && strlen (dprintf_channel) > 0) printf_line = xstrprintf ("call (void) %s (%s,%s)", dprintf_function, dprintf_channel, dprintf_args); else printf_line = xstrprintf ("call (void) %s (%s)", dprintf_function, dprintf_args); } So that'll expand to one infcall to fprintf (get_stderr (), ...) instead of: fprintf (stderr, ...) Which is the same thing -- still one infcall. -- 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.