From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25781 invoked by alias); 8 Sep 2011 19:36:04 -0000 Received: (qmail 25557 invoked by uid 22791); 8 Sep 2011 19:36:03 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-yw0-f41.google.com (HELO mail-yw0-f41.google.com) (209.85.213.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Sep 2011 19:35:40 +0000 Received: by ywm13 with SMTP id 13so1083526ywm.0 for ; Thu, 08 Sep 2011 12:35:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.30.226 with SMTP id v2mr1707316pbh.231.1315510539632; Thu, 08 Sep 2011 12:35:39 -0700 (PDT) Received: by 10.142.57.3 with HTTP; Thu, 8 Sep 2011 12:35:39 -0700 (PDT) In-Reply-To: References: Date: Thu, 08 Sep 2011 19:36:00 -0000 Message-ID: Subject: Re: gdb/mi log stream messages From: Xavier de Gaye To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-09/txt/msg00029.txt.bz2 On Sat, Sep 3, 2011 at 2:11 PM, Xavier de Gaye wrote: > On Tue, Aug 30, 2011 at 10:28 PM, Tom Tromey wrote: >>>>>>> "Xavier" =3D=3D Xavier de Gaye writes: >> >> Xavier> gdb version: 7.3 >> Xavier> In the second gdb/mi test of the following two tests, gdb/mi wri= tes >> Xavier> the "No source file named foo.c.\n" message to the log stream. >> >> Xavier> The gdb/mi documentation states at section "24.4.2 GDB/MI Stream >> Xavier> Records" that "The log stream contains debugging messages being >> Xavier> produced by GDB's internals.". The above message is not a debugg= ing >> Xavier> message. So, is the gdb/mi documentation wrong, or should this m= essage >> Xavier> be written to the console output stream instead, or am I missing >> Xavier> something else ? >> >> I tend to think it should be written to the console output stream. > > > The above gdb/mi log stream message is written by the statement > "exception_print (gdb_stderr, e)" in create_breakpoint(). > > The function mi_interpreter_init() creates the mi output streams: > > =A0... > =A0/* Create MI channels */ > =A0mi->out =3D mi_console_file_new (raw_stdout, "~", '"'); > =A0mi->err =3D mi_console_file_new (raw_stdout, "&", '"'); > =A0mi->log =3D mi->err; > =A0... > > The function mi_interpreter_resume() maps the gdb streams to the mi > streams: > > =A0... > =A0gdb_stdout =3D mi->out; > =A0/* Route error and log output through the MI */ > =A0gdb_stderr =3D mi->err; > =A0gdb_stdlog =3D mi->log; > =A0... > > Since mi->err and mi->log are the same stream, it seems that gdb/mi > writes gdb_stdlog debugging messages and gdb_stderr error messages to > the same stream, which would explain this problem. I have entered this problem as bug 13170 in the bug database. FWIW messages printed by the warning() function are also written to gdb/mi debugging messages log stream. Xavier