public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/16308] New: No "(gdb)" marker output after MI *stopped record
@ 2013-12-09 17:31 richard.stuckey at intel dot com
  0 siblings, 0 replies; only message in thread
From: richard.stuckey at intel dot com @ 2013-12-09 17:31 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16308

            Bug ID: 16308
           Summary: No "(gdb)" marker output after MI *stopped record
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: richard.stuckey at intel dot com

The syntax defined for MI output at
https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax
states, both in the text and in the BNF, that a sequence of output records is
always terminated by the "(gdb)" string.

However, this string is not output after *stopped exec-async-output records.

This can be fixed by altering function mi_on_normal_stop in file
mi/mi-interp.c:

  fputs_unfiltered ("*stopped", raw_stdout);
  mi_out_put (mi_uiout, raw_stdout);
  mi_out_rewind (mi_uiout);
  mi_print_timing_maybe ();
  fputs_unfiltered ("\n", raw_stdout);
  fputs_unfiltered ("(gdb) \n", raw_stdout);     // fix
  gdb_flush (raw_stdout);
}


Unfortunately, this then results in an additional two hundred or so failures in
the gdb.mi section of the gdb test suite, mostly with error  "unknown output
after running", which is probably the unexpected "(gdb)" after *stopped
records.

----

After some discussion with a colleague, it is not clear to me when the "(gdb)"
should actually be output, and whether this is actually a bug.  I interpret the
"(gdb)" as being an easily-distinguishable EOT marker that tells the MI output
reader that it has a sequence of complete records which it can now parse, as
opposed to having an incomplete record because it has not yet read all that
record's data from the MI output stream.  Is that correct?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-09 17:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-09 17:31 [Bug mi/16308] New: No "(gdb)" marker output after MI *stopped record richard.stuckey at intel dot com

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).