This is the mail archive of the gdb@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: asynchronous MI output commands


On Fri, May 05, 2006 at 09:59:03PM -0400, Daniel Jacobowitz wrote:
> On Fri, May 05, 2006 at 09:27:06PM -0400, Bob Rossi wrote:
> > The first problem that I've run into is determining if an MI output
> > command is synchronous or asynchronous. I can tell if the MI output
> > command is asynchronous by looking for, reason="abc", like below,
> >   47*stopped,reason="end-stepping-range",thread-id="0", ...
> 
> `ASYNC-RECORD ==>'
>      `EXEC-ASYNC-OUTPUT | STATUS-ASYNC-OUTPUT | NOTIFY-ASYNC-OUTPUT'
> 
> `EXEC-ASYNC-OUTPUT ==>'
>      `[ TOKEN ] "*" ASYNC-OUTPUT'
> 
> `STATUS-ASYNC-OUTPUT ==>'
>      `[ TOKEN ] "+" ASYNC-OUTPUT'
> 
> `NOTIFY-ASYNC-OUTPUT ==>'
>      `[ TOKEN ] "=" ASYNC-OUTPUT'
> 
> Why can't you tell that output is asynchronous from the *stopped, as
> opposed to ^done?

OK, I could do this, and if that's the prefered way, then I will. The
only strange thing about it, is either I need to hack up the parser to
set a flag when it reaches that point, or I need to walk the parse tree
semi-deep to get that info. Do you still think that would be the
prefered way? Actually, I could just see if I ever get to the
async-record to determine if the command is asynchronous, right?

I just happened to notice that -exec-next and -interpreter-exec console
next are surprisingly different.

(gdb)
-exec-next
^running (gdb)
*stopped,reason="end-stepping-range",thread-id="0",frame={addr="0x0804836b",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbf80e254"}],file="main.c",line="5"}
(gdb)
-interpreter-exec console next
~"6\t  return 0;\n"
^done
(gdb)

Is next asynchronuos in 1 case and not the other?

Bob Rossi


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