* MI interface
@ 2002-09-17 10:33 Piyush Deva
2002-09-18 0:04 ` Arjan van Dijk
0 siblings, 1 reply; 7+ messages in thread
From: Piyush Deva @ 2002-09-17 10:33 UTC (permalink / raw)
To: gdb
Hello everyone,
This is my first time at the gdb mailing list so please excuse any
mistakes.
I just checked out the mi interface of gdb 5.2.1 on a windows system and i
have a question about the mi interface.
Why does gdb redirect the stdout to itself? I mean due to this all programs
parsing the gdb output to a gui have to figure out some way to output the
stdout's (now gdb's) output to a custom console window so that the user
feels that he is working in his own created console. One cant possibly show
him the gdb window and let him work on that as that would make him encounter
the gdb messages from time to time and thus destroy the purpose of building
a gui for gdb.
I didnt notice such a thing in gdb 5.1.1 (mingw build) , where using the mi
interpreter DID create a new console window so i was content with just
parsing gdb's mi output. I would really like to why such a desicion to
redirect stdout/in to gdb was taken with gdb 5.2.1
PRASHANT
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MI interface
2002-09-17 10:33 MI interface Piyush Deva
@ 2002-09-18 0:04 ` Arjan van Dijk
2002-09-18 9:03 ` Keith Seitz
0 siblings, 1 reply; 7+ messages in thread
From: Arjan van Dijk @ 2002-09-18 0:04 UTC (permalink / raw)
To: Piyush Deva; +Cc: gdb
>Why does gdb redirect the stdout to itself? I mean due to this all programs
and I would like to know too!
Arjan
Arjan van Dijk
Institute for Marine and Atmospheric Research Utrecht
Faculty of Physics and Astronomy
Utrecht University
Princetonplein 5
NL - 3584 CC Utrecht
The Netherlands
phone: +31 30 2532815
fax: +31 30 2543163
e-mail: mailto:A.vanDijk@phys.uu.nl
homepage: http://www.phys.uu.nl/~vndijk
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MI interface
2002-09-18 0:04 ` Arjan van Dijk
@ 2002-09-18 9:03 ` Keith Seitz
2002-09-18 9:16 ` Daniel Jacobowitz
2002-09-18 11:47 ` Prashant Deva
0 siblings, 2 replies; 7+ messages in thread
From: Keith Seitz @ 2002-09-18 9:03 UTC (permalink / raw)
To: Arjan van Dijk; +Cc: Piyush Deva, gdb
On Wed, 18 Sep 2002, Arjan van Dijk wrote:
> >Why does gdb redirect the stdout to itself? I mean due to this all programs
>
> and I would like to know too!
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=623&return_url=http%3A%2F%2Fsources.redhat.com%2Fcgi-bin%2Fgnatsweb.pl%3Fdatabase%3Dgdb%26category%3Dall%26severity%3Dall%26priority%3Dall%26responsible%3Dall%26submitter_id%3Dall%26state%3Dall%26ignoreclosed%3DIgnore%2520Closed%26class%3Dall%26synopsis%3D%26multitext%3D%26columns%3Dcategory%26columns%3Dstate%26columns%3Dclass%26columns%3Dresponsible%26columns%3Dsynopsis%26displaydate%3DDisplay%2520Current%2520Date%26cmd%3Dsubmit%2520query%26sortby%3DResponsible%26.cgifields%3Dcolumns%26.cgifields%3Doriginatedbyme%26.cgifields%3Ddisplaydate%26.cgifields%3Dignoreclosed
Basically the problem is that in order for this to work on a native
target, that target must be async. Right now there are no async native
targets. I hope to correct that when I've got some more cycles.
This is still a very, very tricky situation, though. While many programs
will work with just this target output, I would suspect that many
applications simply won't work (well) this way. Imagine trying to debug
emacs or vi -- the developer is almost certainly going to want to use a
separate tty for the inferior. Unless the UI developer is willing (or
crazy enough) to implement a terminal emulator in the IDE/GUI, these more
sophisticated programs just aren't going to work properly.
Keith
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MI interface
2002-09-18 9:03 ` Keith Seitz
@ 2002-09-18 9:16 ` Daniel Jacobowitz
2002-09-18 11:47 ` Prashant Deva
1 sibling, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2002-09-18 9:16 UTC (permalink / raw)
To: Keith Seitz; +Cc: Arjan van Dijk, Piyush Deva, gdb
On Wed, Sep 18, 2002 at 09:05:33AM -0700, Keith Seitz wrote:
> On Wed, 18 Sep 2002, Arjan van Dijk wrote:
>
> > >Why does gdb redirect the stdout to itself? I mean due to this all programs
> >
> > and I would like to know too!
>
> http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=623&return_url=http%3A%2F%2Fsources.redhat.com%2Fcgi-bin%2Fgnatsweb.pl%3Fdatabase%3Dgdb%26category%3Dall%26severity%3Dall%26priority%3Dall%26responsible%3Dall%26submitter_id%3Dall%26state%3Dall%26ignoreclosed%3DIgnore%2520Closed%26class%3Dall%26synopsis%3D%26multitext%3D%26columns%3Dcategory%26columns%3Dstate%26columns%3Dclass%26columns%3Dresponsible%26columns%3Dsynopsis%26displaydate%3DDisplay%2520Current%2520Date%26cmd%3Dsubmit%2520query%26sortby%3DResponsible%26.cgifields%3Dcolumns%26.cgifields%3Doriginatedbyme%26.cgifields%3Ddisplaydate%26.cgifields%3Dignoreclosed
>
> Basically the problem is that in order for this to work on a native
> target, that target must be async. Right now there are no async native
> targets. I hope to correct that when I've got some more cycles.
>
> This is still a very, very tricky situation, though. While many programs
> will work with just this target output, I would suspect that many
> applications simply won't work (well) this way. Imagine trying to debug
> emacs or vi -- the developer is almost certainly going to want to use a
> separate tty for the inferior. Unless the UI developer is willing (or
> crazy enough) to implement a terminal emulator in the IDE/GUI, these more
> sophisticated programs just aren't going to work properly.
It's not hard to make the program run in a new xterm/separate 'screen'
session/different virtual console. It would be reasonable to
centralize the code to do this and include it with GDB. One way to do
it is to provide an application which reads from a socket or FIFO,
communicates with GDB in a simple protocol, and handles all
input/output. Then you can exec 'screen helper tcp:4111' or use an
xterm or openvt equivalent or what-have-you.
Of course, what should be done with the output packets in MI etc. is
not clear. Probably "reported via MI console" would be a fourth option
to screen/xterm/openvt; generally you either want to see the program's
output in a separate window OR you want your debugger/testing tool to
see it, not both.
This could even extend to running a program in a host xterm on a remote
gdbserver over TCP/IP, much more nicely than the current method.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MI interface
2002-09-18 9:03 ` Keith Seitz
2002-09-18 9:16 ` Daniel Jacobowitz
@ 2002-09-18 11:47 ` Prashant Deva
2002-09-18 11:50 ` Keith Seitz
1 sibling, 1 reply; 7+ messages in thread
From: Prashant Deva @ 2002-09-18 11:47 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb
Does that mean that all people developing a gui right now should switch to
gdb v5.1.1?
PRASHANT
----- Original Message -----
From: "Keith Seitz" <keiths@redhat.com>
To: "Arjan van Dijk" <a.vandijk@phys.uu.nl>
Cc: "Piyush Deva" <fulcrum1@onlysmart.com>; <gdb@sources.redhat.com>
Sent: Wednesday, September 18, 2002 9:35 PM
Subject: Re: MI interface
> On Wed, 18 Sep 2002, Arjan van Dijk wrote:
>
> > >Why does gdb redirect the stdout to itself? I mean due to this all
programs
> >
> > and I would like to know too!
>
>
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&databas
e=gdb&pr=623&return_url=http%3A%2F%2Fsources.redhat.com%2Fcgi-bin%2Fgnatsweb
.pl%3Fdatabase%3Dgdb%26category%3Dall%26severity%3Dall%26priority%3Dall%26re
sponsible%3Dall%26submitter_id%3Dall%26state%3Dall%26ignoreclosed%3DIgnore%2
520Closed%26class%3Dall%26synopsis%3D%26multitext%3D%26columns%3Dcategory%26
columns%3Dstate%26columns%3Dclass%26columns%3Dresponsible%26columns%3Dsynops
is%26displaydate%3DDisplay%2520Current%2520Date%26cmd%3Dsubmit%2520query%26s
ortby%3DResponsible%26.cgifields%3Dcolumns%26.cgifields%3Doriginatedbyme%26.
cgifields%3Ddisplaydate%26.cgifields%3Dignoreclosed
>
> Basically the problem is that in order for this to work on a native
> target, that target must be async. Right now there are no async native
> targets. I hope to correct that when I've got some more cycles.
>
> This is still a very, very tricky situation, though. While many programs
> will work with just this target output, I would suspect that many
> applications simply won't work (well) this way. Imagine trying to debug
> emacs or vi -- the developer is almost certainly going to want to use a
> separate tty for the inferior. Unless the UI developer is willing (or
> crazy enough) to implement a terminal emulator in the IDE/GUI, these more
> sophisticated programs just aren't going to work properly.
>
> Keith
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MI interface
2002-09-18 11:47 ` Prashant Deva
@ 2002-09-18 11:50 ` Keith Seitz
2002-09-18 14:07 ` Prashant Deva
0 siblings, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2002-09-18 11:50 UTC (permalink / raw)
To: Prashant Deva; +Cc: gdb
On Thu, 19 Sep 2002, Prashant Deva wrote:
> Does that mean that all people developing a gui right now should switch to
> gdb v5.1.1?
I don't see how 5.1.1 would help. In terms of MI, 5.1 and 5.2 and nearly
identical. All versions of MI, including 5.x and cvs head suffer from
this "problem".
Keith
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MI interface
2002-09-18 11:50 ` Keith Seitz
@ 2002-09-18 14:07 ` Prashant Deva
0 siblings, 0 replies; 7+ messages in thread
From: Prashant Deva @ 2002-09-18 14:07 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb
> > Does that mean that all people developing a gui right now should switch
to
> > gdb v5.1.1?
>
> I don't see how 5.1.1 would help. In terms of MI, 5.1 and 5.2 and nearly
> identical. All versions of MI, including 5.x and cvs head suffer from
> this "problem".
>
> Keith
Well,
actually a inoticed in gdb 5.2 that even in annotated mode the program
starts in the same console as gdb.
But not so in gdb 5.1 where the program being debugged creates a new window
of its own. Which is asked whether the people developing a gui should switch
to v5.1.1.
But it is strange that for you gdb 5.1 has the same 'problem'? Is it due to
the difference of builds? I am using the mingw build.
PRASHANT
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-09-18 21:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-17 10:33 MI interface Piyush Deva
2002-09-18 0:04 ` Arjan van Dijk
2002-09-18 9:03 ` Keith Seitz
2002-09-18 9:16 ` Daniel Jacobowitz
2002-09-18 11:47 ` Prashant Deva
2002-09-18 11:50 ` Keith Seitz
2002-09-18 14:07 ` Prashant Deva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox