* gdb/mi log stream messages
@ 2011-08-27 19:29 Xavier de Gaye
2011-08-30 20:28 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Xavier de Gaye @ 2011-08-27 19:29 UTC (permalink / raw)
To: gdb
gdb version: 7.3
In the second gdb/mi test of the following two tests, gdb/mi writes
the "No source file named foo.c.\n" message to the log stream.
The gdb/mi documentation states at section "24.4.2 GDB/MI Stream
Records" that "The log stream contains debugging messages being
produced by GDB's internals.". The above message is not a debugging
message. So, is the gdb/mi documentation wrong, or should this message
be written to the console output stream instead, or am I missing
something else ?
==========
xavier$ ~/src/gdb/gdb-7.3/install/bin/gdb -q -ex "set confirm off"
(gdb) shell echo "main(){}" | gcc -x c -g -
(gdb) file a.out
(gdb) break foo.c:1
No source file named foo.c.
(gdb) quit
xavier$
==========
xavier$ ~/src/gdb/gdb-7.3/install/bin/gdb --interpreter=mi -q -ex "set
confirm off" a.out
=thread-group-added,id="i1"
~"Reading symbols from /home/xavier/tmp/a.out..."
~"done.\n"
(gdb)
-interpreter-exec console "break foo.c:1"
&"No source file named foo.c.\n"
^done
(gdb)
quit
&"quit\n"
xavier$
==========
Xavier
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb/mi log stream messages
2011-08-27 19:29 gdb/mi log stream messages Xavier de Gaye
@ 2011-08-30 20:28 ` Tom Tromey
2011-09-03 12:11 ` Xavier de Gaye
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2011-08-30 20:28 UTC (permalink / raw)
To: Xavier de Gaye; +Cc: gdb
>>>>> "Xavier" == Xavier de Gaye <xdegaye@gmail.com> writes:
Xavier> gdb version: 7.3
Xavier> In the second gdb/mi test of the following two tests, gdb/mi writes
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 debugging
Xavier> message. So, is the gdb/mi documentation wrong, or should this message
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.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb/mi log stream messages
2011-08-30 20:28 ` Tom Tromey
@ 2011-09-03 12:11 ` Xavier de Gaye
2011-09-08 19:36 ` Xavier de Gaye
0 siblings, 1 reply; 4+ messages in thread
From: Xavier de Gaye @ 2011-09-03 12:11 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb
On Tue, Aug 30, 2011 at 10:28 PM, Tom Tromey wrote:
>>>>>> "Xavier" == Xavier de Gaye writes:
>
> Xavier> gdb version: 7.3
> Xavier> In the second gdb/mi test of the following two tests, gdb/mi writes
> 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 debugging
> Xavier> message. So, is the gdb/mi documentation wrong, or should this message
> 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:
...
/* Create MI channels */
mi->out = mi_console_file_new (raw_stdout, "~", '"');
mi->err = mi_console_file_new (raw_stdout, "&", '"');
mi->log = mi->err;
...
The function mi_interpreter_resume() maps the gdb streams to the mi
streams:
...
gdb_stdout = mi->out;
/* Route error and log output through the MI */
gdb_stderr = mi->err;
gdb_stdlog = mi->log;
...
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.
Xavier
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb/mi log stream messages
2011-09-03 12:11 ` Xavier de Gaye
@ 2011-09-08 19:36 ` Xavier de Gaye
0 siblings, 0 replies; 4+ messages in thread
From: Xavier de Gaye @ 2011-09-08 19:36 UTC (permalink / raw)
To: gdb
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" == Xavier de Gaye writes:
>>
>> Xavier> gdb version: 7.3
>> Xavier> In the second gdb/mi test of the following two tests, gdb/mi writes
>> 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 debugging
>> Xavier> message. So, is the gdb/mi documentation wrong, or should this message
>> 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:
>
> ...
> /* Create MI channels */
> mi->out = mi_console_file_new (raw_stdout, "~", '"');
> mi->err = mi_console_file_new (raw_stdout, "&", '"');
> mi->log = mi->err;
> ...
>
> The function mi_interpreter_resume() maps the gdb streams to the mi
> streams:
>
> ...
> gdb_stdout = mi->out;
> /* Route error and log output through the MI */
> gdb_stderr = mi->err;
> gdb_stdlog = mi->log;
> ...
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-08 19:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-27 19:29 gdb/mi log stream messages Xavier de Gaye
2011-08-30 20:28 ` Tom Tromey
2011-09-03 12:11 ` Xavier de Gaye
2011-09-08 19:36 ` Xavier de Gaye
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).