Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* GDB/MI
@ 2003-02-21  1:20 Nick Roberts
  2003-02-21  1:45 ` GDB/MI Andrew Cagney
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Roberts @ 2003-02-21  1:20 UTC (permalink / raw)
  To: gdb

The debugger mode that uses GDB/MI which I am trying to write for Emacs uses a
queue but I can't get it initialised properly. This is why:

If I start with gdb -interp=mi mytest, I get

~"GNU gdb 2003-02-04-cvs\n"
~"Copyright 2003 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and you are\n"
~"welcome to change it and/or distribute copies of it under certain conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
~"This GDB was configured as \"i586-pc-linux-gnu\"..."
~"\n"
(gdb) 

I see that the text is now escaped with ~ so I know this is output for the
console. However, Emacs don't know that GDB is ready for input. With level 2
annotations, I get:

GNU gdb 2003-02-04-cvs
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-pc-linux-gnu"...
breakpoints-invalid

^Z^Zframes-invalid


^Z^Zpre-prompt
(gdb) 
^Z^Zprompt

and the prompt annotation tells Emacs that GDB is ready for input. Since Emacs'
interaction is asynchronous, the timing is wrong if I assume GDB is ready for
input immediately after its invocation. I think the initial output should be:

~"GNU gdb 2003-02-04-cvs\n"
~"Copyright 2003 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and you are\n"
~"welcome to change it and/or distribute copies of it under certain conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
~"This GDB was configured as \"i586-pc-linux-gnu\"..."
~"\n"
^done
(gdb) 

i.e GDB should notify its status with the ^done record.

I could look for the prompt (gdb) for notification and I imagine this is what
gvd does but the idea presumably is to have a machine interface and not rely
on output intended for the (human) user. For example this could be defeated
with `set prompt'.

I will file a bug report if someone agrees with my analysis.

Nick

Incidently, the string (gdb) that is output here is not the prompt but an
imposter as I get:

-gdb-set prompt (hec)
^done
(gdb) 
-gdb-show prompt
^done,value="(hec)"
(gdb) 


^ permalink raw reply	[flat|nested] 10+ messages in thread
* gdb/mi
@ 2002-07-05 13:27 Greg Watson
  2002-07-10 14:40 ` gdb/mi Andrew Cagney
  0 siblings, 1 reply; 10+ messages in thread
From: Greg Watson @ 2002-07-05 13:27 UTC (permalink / raw)
  To: gdb

I have some questions/comments about gdb/mi if someone could help out:

1. I've configure gdb 5.2 with --enable-gdbmi and --with-uiout. 
However when I run "gdb --interpreter=mi" the initial messages are 
not in console stream output format, but later messages are. Is this 
by design?

2. When I run a target program, it's output is not in target stream 
output format. Should this be the case?

3. The gdb/mi output syntax in the manual does not quite reflect 
reality. In particular the 'console-stream-output', 
'target-stream-output' and 'log-stream-output' rules should be 
suffixed with 'nl'.  Also, I've observed an 'out-of-band-record' 
appearing after a 'result-record' but the syntax doesn't allow this. 
I guess it should be something like:

output -> (out-of-band-record)* [result-record] (out-of-band-record)* 
"(gdb)" nl


Regards,

Greg


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-02-26 15:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1026391983.21348.ezmlm@sources.redhat.com>
2002-07-11 10:47 ` gdb/mi Jim Ingham
2003-02-21  1:20 GDB/MI Nick Roberts
2003-02-21  1:45 ` GDB/MI Andrew Cagney
2003-02-21 20:30   ` GDB/MI Nick Roberts
2003-02-22 20:02   ` GDB/MI Eli Zaretskii
2003-02-26 15:03     ` GDB/MI Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2002-07-05 13:27 gdb/mi Greg Watson
2002-07-10 14:40 ` gdb/mi Andrew Cagney
2002-07-10 16:10   ` gdb/mi Greg Watson
2002-07-10 16:47     ` gdb/mi Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox