[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-debug-dev] GDB/MI Issues
|
On Wed, 31 Jul 2002, Alain Magloire wrote:
> // gdb/mi will do this
> # gdb --interpreter=mi ~/hello
> run
> &"run\n"
> Hello world err^done,reason="exited-normally"
> (gdb)
>
>
> I was expecting:
@"Hello world err"
> ^done,reason="exited-normarlly"
This is a known problem with MI. All inferior I/O only works with reomte
targets.
This problem is much more difficult than just getting I/O to show up in a
UI. For many simple cases, MI's (planned) channeling of the inferior's I/O
is not sufficient. What would a user debugging a curses app do? For native
(unix) hosts, eclipse's (cdt) debugger is going to need to be able to open
an xterm if the user wants/needs it. Fortunately, it's not that tough to
do (anymore): insight already does this. Now, whether swt et al can snarf
an xwindow is another story. I suspect that we're going to suffer with
an ugly UI if the user requests this, but in this case, our hands are tied
(unless someone wants to write a terminal emulator or something).
We're working on the simple case.
> 2- and this which will fool the parser in thinking that the
> first "(gdb)\n" Termination MI Output string was issued
> by the debugger.
>
> # cat hello.c
> #include <stdio.h>
> int main(int argc, char *argv[]) {
> printf ("(gdb)\n");
> return 0;
> }
>
> // gdb/mi will do this
> # gdb --interpreter=mi ~/hello
> run
> &"run\n"
> (gdb)
> ^done,reason="exited-normally"
> (gdb)
>
>
> I was expecting
> @ (gdb)
> ^done,reason="exited-normarlly"
> (gdb)
This is exactly the same as before. THe output _should_ be '@"(gdb)\n"'.
Keith