This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/671: Changing GDB/MI spec say the should be a termination
- From: "Alain Magloire" <alain at qnx dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 26 Aug 2002 19:38:00 -0000
- Subject: Re: gdb/671: Changing GDB/MI spec say the should be a termination
- Reply-to: "Alain Magloire" <alain at qnx dot com>
The following reply was made to PR gdb/671; it has been noted by GNATS.
From: "Alain Magloire" <alain@qnx.com>
To: ac131313@ges.redhat.com (Andrew Cagney)
Cc: gdb-gnats@sources.redhat.com
Subject: Re: gdb/671: Changing GDB/MI spec say the should be a termination
Date: Mon, 26 Aug 2002 15:29:41 -0400 (EDT)
>
>
> > 1:int main() {
> > 2: int x;
> > 3: pthread_create(NULL, NULL, routine, NULL);
> > 4: printf("Hello world\n");
> > 5: sleep(200000); // Or a very time consuming function called.
> > 6: printf("After the long wait\n");
> > 7: return 0;
> > 8:}
> >
> > gdb/mi will issue things like:
> > (gdb)
> > -break-insert file.c:6
> > ^done,bkpt={...}
>
> Is there a ``run/continue'' missing in here somewhere?
Yes.
>
> > ~"[New Thread 1024 (LWP 30497)]\n"
> > ~"[Switching to Thread 1024 (LWP 30497)]\n"
> > .... wait for the sleep ....
> > *stopped,reason=...
> > (gdb)
> >
> > You do not have the "(gdb)" comming right away.
> >
> > OUTPUT ==> (OUT-OF-BAND-RECORD)* [RESULT-RECORD] "(gdb)"nl
> >
> > I read the definition like you can accumulate outputs and deal with them only
> > when encounter "(gdb)" which is true unless you want to wait for the sleep() to
> > finish. In practice we can consider Out-of-band completely async and should be
> > process right away. It was not clear at first sight, IMHO.
>
> Is this an async target (target remote-async)? No current native target
> is async. This makes correctly implemeting out-of-band messages very
> difficult.
This goes for any streams(log/target/console).
Changing the syntax to something like:
OUTPUT ==> (OUT-OF-BAND-RECORD)* | [RESULT-RECORD] "(gdb)"nl
^^^^
Is probably more accurate. GDB(console-stream) will send oob's like
creating new thread etc ... at any time.
But you say "no current native" is asyn, which seems to say that remote
is. On GNU/Linux gdb-5.2.1 using gdbserver target streams are not asyn
i.e properly MI wrap either.