This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC, doc] fix document error on the grammar of GDB/MI output format syntax


> The change log could be: Fix syntax description error about GDB/MI "out-of-band-record", there should be a "new line" in end.
> 
> Thanks.
> 
> Yuanhui Zhang

I may have given you bad advice when we discussed this on gdb@.
Looking at the patch, I see you're repeating the "nl", which
was what I thought we could avoid. But now that we're trying to
implement the suggestion, and re-reading the grammar, it might
make better logical sense to group the marker used for a given
output report (Eg: "*" or "=") and the associated nl in the same
rule.

Concretely, this is the patch I would suggest instead (you'll notice
that I removed one such "nl") to move it elsewhere.  I think it's an
extension of what you originally suggested?

Sorry about flip-flopping on you like that...

-- 
Joel

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index b7551c2..f392733 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -29166,16 +29166,16 @@ corresponding output for that command will also be prefixed by that same
 @code{@var{exec-async-output} | @var{status-async-output} | @var{notify-async-output}}
 
 @item @var{exec-async-output} @expansion{}
-@code{[ @var{token} ] "*" @var{async-output}}
+@code{[ @var{token} ] "*" @var{async-output}} @var{nl}
 
 @item @var{status-async-output} @expansion{}
-@code{[ @var{token} ] "+" @var{async-output}}
+@code{[ @var{token} ] "+" @var{async-output}} @var{nl}
 
 @item @var{notify-async-output} @expansion{}
-@code{[ @var{token} ] "=" @var{async-output}}
+@code{[ @var{token} ] "=" @var{async-output}} @var{nl}
 
 @item @var{async-output} @expansion{}
-@code{@var{async-class} ( "," @var{result} )* @var{nl}}
+@code{@var{async-class} ( "," @var{result} )*
 
 @item @var{result-class} @expansion{}
 @code{"done" | "running" | "connected" | "error" | "exit"}
@@ -29207,13 +29207,13 @@ depending on the needs---this is still in development).
 @code{@var{console-stream-output} | @var{target-stream-output} | @var{log-stream-output}}
 
 @item @var{console-stream-output} @expansion{}
-@code{"~" @var{c-string}}
+@code{"~" @var{c-string}} @var{nl}
 
 @item @var{target-stream-output} @expansion{}
-@code{"@@" @var{c-string}}
+@code{"@@" @var{c-string}} @var{nl}
 
 @item @var{log-stream-output} @expansion{}
-@code{"&" @var{c-string}}
+@code{"&" @var{c-string}} @var{nl}
 
 @item @var{nl} @expansion{}
 @code{CR | CR-LF}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]