Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* GDB/MI async output token field
@ 2014-05-23  1:13 Bob Rossi
  2014-05-25  7:16 ` Vladimir Prus
  0 siblings, 1 reply; 8+ messages in thread
From: Bob Rossi @ 2014-05-23  1:13 UTC (permalink / raw)
  To: gdb

Hi,

I'm slowly working through the GDB/MI output command functionality.

On this page,
https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax

The documentation says,
 Note that for all async output, while the token is allowed by the
 grammar and may be output by future versions of gdb for select async
 output messages, it is generally omitted.

 Frontends should treat all async output as reporting general changes in
 the state of the target and there should be no need to associate async
 output to any prior command. 

I searched through the GDB source code and can't find a single place
where this occurs.

Does anyone know how to make a token appear in the async record?
Did older versions do it?

If GDB is not using this feature, I propose we remove this information
from the manual until we actually need the functionality.

Thanks,
Bob Rossi


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

* Re: GDB/MI async output token field
  2014-05-23  1:13 GDB/MI async output token field Bob Rossi
@ 2014-05-25  7:16 ` Vladimir Prus
  2014-05-26  0:14   ` Vladimir Prus
  2014-05-28  7:59   ` Bob Rossi
  0 siblings, 2 replies; 8+ messages in thread
From: Vladimir Prus @ 2014-05-25  7:16 UTC (permalink / raw)
  To: Bob Rossi, gdb

On 05/23/2014 05:14 AM, Bob Rossi wrote:
> Hi,
>
> I'm slowly working through the GDB/MI output command functionality.
>
> On this page,
> https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax
>
> The documentation says,
>   Note that for all async output, while the token is allowed by the
>   grammar and may be output by future versions of gdb for select async
>   output messages, it is generally omitted.
>
>   Frontends should treat all async output as reporting general changes in
>   the state of the target and there should be no need to associate async
>   output to any prior command.
>
> I searched through the GDB source code and can't find a single place
> where this occurs.
>
> Does anyone know how to make a token appear in the async record?
> Did older versions do it?
>
> If GDB is not using this feature, I propose we remove this information
> from the manual until we actually need the functionality.

Bob,

such clarification will be good.

- Volodya


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

* Re: GDB/MI async output token field
  2014-05-25  7:16 ` Vladimir Prus
@ 2014-05-26  0:14   ` Vladimir Prus
  2014-05-28  7:59   ` Bob Rossi
  1 sibling, 0 replies; 8+ messages in thread
From: Vladimir Prus @ 2014-05-26  0:14 UTC (permalink / raw)
  To: gdb

On 05/23/2014 05:14 AM, Bob Rossi wrote:
> Hi,
>
> I'm slowly working through the GDB/MI output command functionality.
>
> On this page,
> https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax
>
> The documentation says,
>   Note that for all async output, while the token is allowed by the
>   grammar and may be output by future versions of gdb for select async
>   output messages, it is generally omitted.
>
>   Frontends should treat all async output as reporting general changes in
>   the state of the target and there should be no need to associate async
>   output to any prior command.
>
> I searched through the GDB source code and can't find a single place
> where this occurs.
>
> Does anyone know how to make a token appear in the async record?
> Did older versions do it?
>
> If GDB is not using this feature, I propose we remove this information
> from the manual until we actually need the functionality.

Bob,

such clarification will be good.

- Volodya


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

* Re: GDB/MI async output token field
  2014-05-25  7:16 ` Vladimir Prus
  2014-05-26  0:14   ` Vladimir Prus
@ 2014-05-28  7:59   ` Bob Rossi
  2014-05-29  4:26     ` Bob Rossi
  1 sibling, 1 reply; 8+ messages in thread
From: Bob Rossi @ 2014-05-28  7:59 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb

On Sun, May 25, 2014 at 11:16:05AM +0400, Vladimir Prus wrote:
> On 05/23/2014 05:14 AM, Bob Rossi wrote:
> >Hi,
> >
> >I'm slowly working through the GDB/MI output command functionality.
> >
> >On this page,
> >https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax
> >
> >The documentation says,
> >  Note that for all async output, while the token is allowed by the
> >  grammar and may be output by future versions of gdb for select async
> >  output messages, it is generally omitted.
> >
> >  Frontends should treat all async output as reporting general changes in
> >  the state of the target and there should be no need to associate async
> >  output to any prior command.
> >
> >I searched through the GDB source code and can't find a single place
> >where this occurs.
> >
> >Does anyone know how to make a token appear in the async record?
> >Did older versions do it?
> >
> >If GDB is not using this feature, I propose we remove this information
> >from the manual until we actually need the functionality.
> 
> Bob,
> 
> such clarification will be good.

Hi,

I've got a patch to change the documentation to remove the tokens from
the async output records. I saw this in the ChangeLog,

2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>

        * gdb.texinfo (GDB/MI Output Syntax): Clarify that async
         output does not necessary include any tokens.

That looked a little suspicous. That is, perhaps there are cases were
the token is in the async output?

Are you aware of any such cases? It doesn't look like the current
version of GDB emits this information, but perhaps older versions do?

Before I submit my patch I'd like to have this issue resolved.
It doesn't make sense to submit my current patch if old versions of GDB
can produce this content.

Thanks,
Bob Rossi


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

* Re: GDB/MI async output token field
  2014-05-28  7:59   ` Bob Rossi
@ 2014-05-29  4:26     ` Bob Rossi
  2014-05-29 17:04       ` Vladimir Prus
  0 siblings, 1 reply; 8+ messages in thread
From: Bob Rossi @ 2014-05-29  4:26 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb

On Tue, May 27, 2014 at 11:55:49AM -0400, Bob Rossi wrote:
> On Sun, May 25, 2014 at 11:16:05AM +0400, Vladimir Prus wrote:
> > On 05/23/2014 05:14 AM, Bob Rossi wrote:
> > >On this page,
> > >https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax
> > >
> > >The documentation says,
> > >  Note that for all async output, while the token is allowed by the
> > >  grammar and may be output by future versions of gdb for select async
> > >  output messages, it is generally omitted.
> > >
> > >  Frontends should treat all async output as reporting general changes in
> > >  the state of the target and there should be no need to associate async
> > >  output to any prior command.
> > >
> > >I searched through the GDB source code and can't find a single place
> > >where this occurs.
> > 
> > such clarification will be good.
> 
> 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
> 
>         * gdb.texinfo (GDB/MI Output Syntax): Clarify that async
>          output does not necessary include any tokens.
> 
> That looked a little suspicous. That is, perhaps there are cases were
> the token is in the async output?
> 
Perhaps I was unclear. I have a patch that removes the [token] syntax
from the GDB manual regarding async output.

I found your commit message that added a note that stated async
output does not necessarily include tokens.

The note made me think that at the time, you knew of at least one case
where async output would include the token (or you would have removed
the token syntax from the async output instead of saying that the token
might not be included).

Can you (or anyone) recall a case where GDB would output a token with an
async record?

I don't want to post a patch that removes the token syntax from the gdb
manual if indeed someone will run into it in the wild. That makes the
situation worse, not better.

Thanks,
Bob Rossi


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

* Re: GDB/MI async output token field
  2014-05-29  4:26     ` Bob Rossi
@ 2014-05-29 17:04       ` Vladimir Prus
  2014-05-29 19:22         ` Bob Rossi
  0 siblings, 1 reply; 8+ messages in thread
From: Vladimir Prus @ 2014-05-29 17:04 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gdb

On 05/29/2014 06:49 AM, Bob Rossi wrote:
> On Tue, May 27, 2014 at 11:55:49AM -0400, Bob Rossi wrote:
>> On Sun, May 25, 2014 at 11:16:05AM +0400, Vladimir Prus wrote:
>>> On 05/23/2014 05:14 AM, Bob Rossi wrote:
>>>> On this page,
>>>> https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax
>>>>
>>>> The documentation says,
>>>>   Note that for all async output, while the token is allowed by the
>>>>   grammar and may be output by future versions of gdb for select async
>>>>   output messages, it is generally omitted.
>>>>
>>>>   Frontends should treat all async output as reporting general changes in
>>>>   the state of the target and there should be no need to associate async
>>>>   output to any prior command.
>>>>
>>>> I searched through the GDB source code and can't find a single place
>>>> where this occurs.
>>>
>>> such clarification will be good.
>>
>> 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
>>
>>          * gdb.texinfo (GDB/MI Output Syntax): Clarify that async
>>           output does not necessary include any tokens.
>>
>> That looked a little suspicous. That is, perhaps there are cases were
>> the token is in the async output?
>>
> Perhaps I was unclear. I have a patch that removes the [token] syntax
> from the GDB manual regarding async output.
>
> I found your commit message that added a note that stated async
> output does not necessarily include tokens.
>
> The note made me think that at the time, you knew of at least one case
> where async output would include the token (or you would have removed
> the token syntax from the async output instead of saying that the token
> might not be included).
>
> Can you (or anyone) recall a case where GDB would output a token with an
> async record?
>
> I don't want to post a patch that removes the token syntax from the gdb
> manual if indeed someone will run into it in the wild. That makes the
> situation worse, not better.

The ChangeLog entry is useless, as usual. Here are relevant emails:

	https://sourceware.org/ml/gdb/2008-03/msg00239.html
	https://sourceware.org/ml/gdb-patches/2008-04/msg00202.html

The was single case where token was included in async output, and I removed
that. I don't believe any new cases were added, and nobody was upset in
all that time, so adjusting documentation to say that async output
never includes any tokens seems reasonable to me.

- Volodya


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

* Re: GDB/MI async output token field
  2014-05-29 17:04       ` Vladimir Prus
@ 2014-05-29 19:22         ` Bob Rossi
  2014-06-04 20:28           ` Vladimir Prus
  0 siblings, 1 reply; 8+ messages in thread
From: Bob Rossi @ 2014-05-29 19:22 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb

On Thu, May 29, 2014 at 08:26:25AM +0400, Vladimir Prus wrote:
> On 05/29/2014 06:49 AM, Bob Rossi wrote:
> >On Tue, May 27, 2014 at 11:55:49AM -0400, Bob Rossi wrote:
> >>On Sun, May 25, 2014 at 11:16:05AM +0400, Vladimir Prus wrote:
> >>>On 05/23/2014 05:14 AM, Bob Rossi wrote:
> >>>>On this page,
> >>>>https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax
> >>>>
> >>>>The documentation says,
> >>>>  Note that for all async output, while the token is allowed by the
> >>>>  grammar and may be output by future versions of gdb for select async
> >>>>  output messages, it is generally omitted.
> >>>>
> >>>>  Frontends should treat all async output as reporting general changes in
> >>>>  the state of the target and there should be no need to associate async
> >>>>  output to any prior command.
> >>>>
> >>>>I searched through the GDB source code and can't find a single place
> >>>>where this occurs.
> >>>
> >>>such clarification will be good.
> >>
> >>2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
> >>
> >>         * gdb.texinfo (GDB/MI Output Syntax): Clarify that async
> >>          output does not necessary include any tokens.
> >>
> >>That looked a little suspicous. That is, perhaps there are cases were
> >>the token is in the async output?
> >>
> >Perhaps I was unclear. I have a patch that removes the [token] syntax
> >from the GDB manual regarding async output.
> >
> >I found your commit message that added a note that stated async
> >output does not necessarily include tokens.
> >
> >The note made me think that at the time, you knew of at least one case
> >where async output would include the token (or you would have removed
> >the token syntax from the async output instead of saying that the token
> >might not be included).
> >
> >Can you (or anyone) recall a case where GDB would output a token with an
> >async record?
> >
> >I don't want to post a patch that removes the token syntax from the gdb
> >manual if indeed someone will run into it in the wild. That makes the
> >situation worse, not better.
> 
> The ChangeLog entry is useless, as usual. Here are relevant emails:
> 
> 	https://sourceware.org/ml/gdb/2008-03/msg00239.html
> 	https://sourceware.org/ml/gdb-patches/2008-04/msg00202.html
> 
> The was single case where token was included in async output, and I removed
> that. I don't believe any new cases were added, and nobody was upset in
> all that time, so adjusting documentation to say that async output
> never includes any tokens seems reasonable to me.

Thanks! That was very helpful. I've now reproduced this behavior.

(gdb)
111-exec-run
111^running
(gdb)
111*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08048355",func="main",args=[],file="main.c",fullname="main.c",line="5"}

The question now arises, is the intent of the documentation that ships
with GDB to accurately represent the current version of GDB or all
version up to and including the current version of GDB?

The current version of GDB obviously does not use the token in the async
output, legacy versions do.

Which should the documentation aim to match?

Thanks,
Bob Rossi


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

* Re: GDB/MI async output token field
  2014-05-29 19:22         ` Bob Rossi
@ 2014-06-04 20:28           ` Vladimir Prus
  0 siblings, 0 replies; 8+ messages in thread
From: Vladimir Prus @ 2014-06-04 20:28 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gdb

On 05/29/2014 11:07 PM, Bob Rossi wrote:

>> The ChangeLog entry is useless, as usual. Here are relevant emails:
>>
>> 	https://sourceware.org/ml/gdb/2008-03/msg00239.html
>> 	https://sourceware.org/ml/gdb-patches/2008-04/msg00202.html
>>
>> The was single case where token was included in async output, and I removed
>> that. I don't believe any new cases were added, and nobody was upset in
>> all that time, so adjusting documentation to say that async output
>> never includes any tokens seems reasonable to me.
>
> Thanks! That was very helpful. I've now reproduced this behavior.
>
> (gdb)
> 111-exec-run
> 111^running
> (gdb)
> 111*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08048355",func="main",args=[],file="main.c",fullname="main.c",line="5"}
>
> The question now arises, is the intent of the documentation that ships
> with GDB to accurately represent the current version of GDB or all
> version up to and including the current version of GDB?
>
> The current version of GDB obviously does not use the token in the async
> output, legacy versions do.
>
> Which should the documentation aim to match?

I'd say the documentation should match the current version merely as a practical matter. Documenting every tweak will probably
reduce readability too much.

- Volodya


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

end of thread, other threads:[~2014-06-04 20:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-23  1:13 GDB/MI async output token field Bob Rossi
2014-05-25  7:16 ` Vladimir Prus
2014-05-26  0:14   ` Vladimir Prus
2014-05-28  7:59   ` Bob Rossi
2014-05-29  4:26     ` Bob Rossi
2014-05-29 17:04       ` Vladimir Prus
2014-05-29 19:22         ` Bob Rossi
2014-06-04 20:28           ` Vladimir Prus

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