public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* `interpreter mi' with -noasync
@ 2003-08-22 22:50 Nick Roberts
  2003-08-28 20:14 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Roberts @ 2003-08-22 22:50 UTC (permalink / raw)
  To: gdb


The `interpreter mi' command works fine as follows:

nick:{nick}63: gdb -n -ann=2 ~/myprog
GNU gdb 5.3.90_2003-08-22-cvs
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-pc-linux-gnu"...
breakpoints-invalid

^Z^Zframes-invalid


^Z^Zpre-prompt
(gdb) 
^Z^Zprompt
interp mi "sho hei"

^Z^Zpost-prompt
&"sho hei\n"
^done,value="23"
(gdb) 

^Z^Zpre-prompt
(gdb) 
^Z^Zprompt


But when used with -noasync it seems to get a bit confused:


nick:{nick}61: gdb -q -n -ann=2 -noasync ~/myprog

^Z^Zbreakpoints-invalid

^Z^Zframes-invalid

^Z^Zpre-prompt
(gdb) 
^Z^Zprompt
interp mi "sho hei"

^Z^Zpost-prompt
&"sho hei\n"
^done,value="23"
(gdb) 
~"\n\032\032pre-"
~"prompt\n"
(gdb) 
^Z^Zprompt


Is that appropriate behaviour or shall I file a bug report?

Nick

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

* Re: `interpreter mi' with -noasync
  2003-08-22 22:50 `interpreter mi' with -noasync Nick Roberts
@ 2003-08-28 20:14 ` Andrew Cagney
  2003-08-29 16:45   ` Nick Roberts
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2003-08-28 20:14 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb


> But when used with -noasync it seems to get a bit confused:

That's not suprizing.  There has never been any intent for MI to work 
with anything but async.

Andrew


> nick:{nick}61: gdb -q -n -ann=2 -noasync ~/myprog
> 
> ^Z^Zbreakpoints-invalid
> 
> ^Z^Zframes-invalid
> 
> ^Z^Zpre-prompt
> (gdb) 
> ^Z^Zprompt
> interp mi "sho hei"
> 
> ^Z^Zpost-prompt
> &"sho hei\n"
> ^done,value="23"
> (gdb) 
> ~"\n\032\032pre-"
> ~"prompt\n"
> (gdb) 
> ^Z^Zprompt
> 
> 
> Is that appropriate behaviour or shall I file a bug report?
> 
> Nick
> 


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

* Re: `interpreter mi' with -noasync
  2003-08-28 20:14 ` Andrew Cagney
@ 2003-08-29 16:45   ` Nick Roberts
  2003-09-03 23:00     ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Roberts @ 2003-08-29 16:45 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb


 > > But when used with -noasync it seems to get a bit confused:
 > 
 > That's not suprizing.  There has never been any intent for MI to work 
 > with anything but async.

I use -noasync with Fortran programs and on a Windows platform (NT, at least)
because, otherwise, Emacs receives the annotations from GDB in the wrong
order. -async doesn't seem to be asynchronous from the users point of view i.e
a second GDB command does not start execution until the first one has
completed.  Although I don't understand what -noasync does, I use it because
seems to do the `right thing'.

Is this use surprising or necessary? Could I get by without -noasync? (I just
want to receive output from GDB in its proper order).

Nick

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

* Re: `interpreter mi' with -noasync
  2003-08-29 16:45   ` Nick Roberts
@ 2003-09-03 23:00     ` Andrew Cagney
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-09-03 23:00 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb

>  > > But when used with -noasync it seems to get a bit confused:
>  > 
>  > That's not suprizing.  There has never been any intent for MI to work 
>  > with anything but async.
> 
> I use -noasync with Fortran programs and on a Windows platform (NT, at least)
> because, otherwise, Emacs receives the annotations from GDB in the wrong
> order. -async doesn't seem to be asynchronous from the users point of view i.e
> a second GDB command does not start execution until the first one has
> completed.  Although I don't understand what -noasync does, I use it because
> seems to do the `right thing'.
> 
> Is this use surprising or necessary? Could I get by without -noasync? (I just
> want to receive output from GDB in its proper order).

There's two things:
- event loop
- async interaction
Async is only fully implemented with the remote target (target 
remote-async).  For the user, asynchronous behavior also only occures 
when explicitly specified vis:
	(gdb) run &
After that development is somewhat stalled - native targets need to be 
switched to the event loop.

What exactly goes wrong with the output?

Andrew


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

end of thread, other threads:[~2003-09-03 23:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-22 22:50 `interpreter mi' with -noasync Nick Roberts
2003-08-28 20:14 ` Andrew Cagney
2003-08-29 16:45   ` Nick Roberts
2003-09-03 23:00     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).