public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* show inferior-tty
@ 2005-07-11  2:13 Nick Roberts
  2005-07-11  3:32 ` Bob Rossi
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Roberts @ 2005-07-11  2:13 UTC (permalink / raw)
  To: gdb


Firstly a doc error (GDB/MI -inferior-tty-show):

   The corresponding GDB command is `show inferior-tty /dev/pts/1'.

should presumably read:

   The corresponding GDB command is `show inferior-tty'.

Secondly, if I don't set the tty, I get:

(gdb) show inferior-tty
Terminal for future runs of program being debugged is "".

I think that it should still display a value.  Also perhaps it could just
say e.g

Terminal for future runs is "/dev/pts/1".

I don't know why the terminal name has to be quoted, but I see that this
practice is sometimes used for other show commands

With MI, if I don't set the tty, I get:

(gdb) 
-inferior-tty-show
^done
(gdb) 

Even if its still considered inappropriate to give a value in this case, I
think it should give a value e.g.

(gdb) 
-inferior-tty-show
^done,inferior_tty_terminal=""
(gdb) 

Incidentally, I don't see the need for this MI command or -inferior-tty-set
because:

(gdb) 
-gdb-set inferior-tty /dev/pts/1       
^done
(gdb) 
-gdb-show inferior-tty 
^done,value="/dev/pts/1"
(gdb) 


Nick

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

* Re: show inferior-tty
  2005-07-11  2:13 show inferior-tty Nick Roberts
@ 2005-07-11  3:32 ` Bob Rossi
  2005-07-11 13:10   ` Daniel Jacobowitz
  2005-07-12  2:07   ` Nick Roberts
  0 siblings, 2 replies; 8+ messages in thread
From: Bob Rossi @ 2005-07-11  3:32 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb

On Mon, Jul 11, 2005 at 02:13:57PM +1200, Nick Roberts wrote:
> 
> Firstly a doc error (GDB/MI -inferior-tty-show):
> 
>    The corresponding GDB command is `show inferior-tty /dev/pts/1'.
> 
> should presumably read:
> 
>    The corresponding GDB command is `show inferior-tty'.

OK, this looks like a good change. I'll also make this.

> Secondly, if I don't set the tty, I get:
> 
> (gdb) show inferior-tty
> Terminal for future runs of program being debugged is "".
> 
> I think that it should still display a value.  Also perhaps it could just
> say e.g
> 
> Terminal for future runs is "/dev/pts/1".

Well, I think this is just preference. GDB has worked like this for
years. I don't mind it the way it is, but if others want it changed,
that's fine too.

> With MI, if I don't set the tty, I get:
> 
> (gdb) 
> -inferior-tty-show
> ^done
> (gdb) 
> 
> Even if its still considered inappropriate to give a value in this case, I
> think it should give a value e.g.
> 
> (gdb) 
> -inferior-tty-show
> ^done,inferior_tty_terminal=""
> (gdb) 

This sounds reasonable.

> Incidentally, I don't see the need for this MI command or -inferior-tty-set
> because:
> 
> (gdb) 
> -gdb-set inferior-tty /dev/pts/1       
> ^done
> (gdb) 
> -gdb-show inferior-tty 
> ^done,value="/dev/pts/1"
> (gdb) 

I was told that it would be a good idea not to bring/use the set/show
variables in GDB/MI. Although, I could have misunderstood the advice 
given to me.

Bob Rossi

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

* Re: show inferior-tty
  2005-07-11  3:32 ` Bob Rossi
@ 2005-07-11 13:10   ` Daniel Jacobowitz
  2005-07-11 21:28     ` Nick Roberts
  2005-07-12  2:07   ` Nick Roberts
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2005-07-11 13:10 UTC (permalink / raw)
  To: gdb; +Cc: Nick Roberts

On Sun, Jul 10, 2005 at 11:32:29PM -0400, Bob Rossi wrote:
> > Incidentally, I don't see the need for this MI command or -inferior-tty-set
> > because:
> > 
> > (gdb) 
> > -gdb-set inferior-tty /dev/pts/1       
> > ^done
> > (gdb) 
> > -gdb-show inferior-tty 
> > ^done,value="/dev/pts/1"
> > (gdb) 
> 
> I was told that it would be a good idea not to bring/use the set/show
> variables in GDB/MI. Although, I could have misunderstood the advice 
> given to me.

Yes.  I asked Bob to do this.  The set of values accessible by -gdb-set
is not documented in the MI section of the manual; we generally treat
them as part of the CLI.  The example for -gdb-set shows $foo, which is
a convenience or "internal" variable, not a setting [although the
example for -gdb-show does show annotate...].

I don't think incorporating the values controllable by -gdb-set in a
stable interface is a good idea for compatibility.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

* Re: show inferior-tty
  2005-07-11 13:10   ` Daniel Jacobowitz
@ 2005-07-11 21:28     ` Nick Roberts
  0 siblings, 0 replies; 8+ messages in thread
From: Nick Roberts @ 2005-07-11 21:28 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

 > Yes.  I asked Bob to do this.  The set of values accessible by -gdb-set
 > is not documented in the MI section of the manual; we generally treat
 > them as part of the CLI.  The example for -gdb-set shows $foo, which is
 > a convenience or "internal" variable, not a setting [although the
 > example for -gdb-show does show annotate...].
 > 
 > I don't think incorporating the values controllable by -gdb-set in a
 > stable interface is a good idea for compatibility.

Other MI commands, notably those used for program control exec-run, exec-next
etc, also implemented through CLI commands (although they are called in a
different way).  I'm not sure where -gdb-set would fail (asynchronous
operation?).  If its not a good idea to use -gdb-set, perhaps it should be
removed or, at least, a note added to the manual as Konstantin Karganov
suggested.  Alternatively, perhaps it could be implemented so that it
doesn't use CLI (like -inferior-tty-set?)  It seems wasteful to implement
a separate MI command for each show subcommand.

Nick

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

* Re: show inferior-tty
  2005-07-11  3:32 ` Bob Rossi
  2005-07-11 13:10   ` Daniel Jacobowitz
@ 2005-07-12  2:07   ` Nick Roberts
  2005-07-12 11:41     ` Bob Rossi
  1 sibling, 1 reply; 8+ messages in thread
From: Nick Roberts @ 2005-07-12  2:07 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gdb

 > > Secondly, if I don't set the tty, I get:
 > > 
 > > (gdb) show inferior-tty
 > > Terminal for future runs of program being debugged is "".
 > > 
 > > I think that it should still display a value.  Also perhaps it could just
 > > say e.g
 > > 
 > > Terminal for future runs is "/dev/pts/1".
 > 
 > Well, I think this is just preference. GDB has worked like this for
 > years. I don't mind it the way it is, but if others want it changed,
 > that's fine too.

What has worked like this for years?  "show inferior-tty" is new isn't it?
The phrase "of program being debugged" seems redundant to me (what other
possibilities are there?).  It might be even more clear to say:

Default terminal for future runs is "/dev/pts/1".

since the redirection overrides this.

Nick

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

* Re: show inferior-tty
  2005-07-12  2:07   ` Nick Roberts
@ 2005-07-12 11:41     ` Bob Rossi
  2005-07-12 13:34       ` Nick Roberts
  0 siblings, 1 reply; 8+ messages in thread
From: Bob Rossi @ 2005-07-12 11:41 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb

On Tue, Jul 12, 2005 at 02:08:29PM +1200, Nick Roberts wrote:
>  > > Secondly, if I don't set the tty, I get:
>  > > 
>  > > (gdb) show inferior-tty
>  > > Terminal for future runs of program being debugged is "".
>  > > 
>  > > I think that it should still display a value.  Also perhaps it could just
>  > > say e.g
>  > > 
>  > > Terminal for future runs is "/dev/pts/1".
>  > 
>  > Well, I think this is just preference. GDB has worked like this for
>  > years. I don't mind it the way it is, but if others want it changed,
>  > that's fine too.
> 
> What has worked like this for years?  "show inferior-tty" is new isn't it?

Sorry for the lack of information. The "inferior-tty" is simply a better
"tty" command. The tty command has had this documentation,
   (gdb) help tty
   Set terminal for future runs of program being debugged.

> The phrase "of program being debugged" seems redundant to me (what other
> possibilities are there?).  It might be even more clear to say:
> 
> Default terminal for future runs is "/dev/pts/1".
> 
> since the redirection overrides this.

I like your suggestion. There is still 1 ambiguity though. Is the
"Default terminal for future runs" for GDB's I/O? or for the inferior's
I/O? I think this question is why the phrase "program being debugged" is used.

I would be more than happy to update the documentation to be more clear.
I certainly know that what's clear to me, usually isn't to the rest of
the world :)

Bob Rossi

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

* Re: show inferior-tty
  2005-07-12 11:41     ` Bob Rossi
@ 2005-07-12 13:34       ` Nick Roberts
  2005-07-12 14:07         ` Dave Korn
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Roberts @ 2005-07-12 13:34 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gdb

 > > What has worked like this for years?  "show inferior-tty" is new isn't it?
 > 
 > Sorry for the lack of information. The "inferior-tty" is simply a better
 > "tty" command. The tty command has had this documentation,
 >    (gdb) help tty
 >    Set terminal for future runs of program being debugged.
 > 
 > > The phrase "of program being debugged" seems redundant to me (what other
 > > possibilities are there?).  It might be even more clear to say:
 > > 
 > > Default terminal for future runs is "/dev/pts/1".
 > > 
 > > since the redirection overrides this.
 > 
 > I like your suggestion. There is still 1 ambiguity though. Is the "Default
 > terminal for future runs" for GDB's I/O? or for the inferior's I/O? I think
 > this question is why the phrase "program being debugged" is used.

I guess thats the reason for "of program being debugged" and explains why it
was a dumb suggestion.

Default terminal for future runs of program being debugged is "/dev/pts/1".?
Default terminal for program I/O for future runs is "/dev/pts/1".?

...pitifully trying to salvage something.

Nick

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

* RE: show inferior-tty
  2005-07-12 13:34       ` Nick Roberts
@ 2005-07-12 14:07         ` Dave Korn
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Korn @ 2005-07-12 14:07 UTC (permalink / raw)
  To: 'Nick Roberts', 'Bob Rossi'; +Cc: gdb

----Original Message----
>From: Nick Roberts
>Sent: 12 July 2005 14:36

>  > > What has worked like this for years?  "show inferior-tty" is new
>  isn't it? >
>  > Sorry for the lack of information. The "inferior-tty" is simply a
>  better > "tty" command. The tty command has had this documentation,
>  >    (gdb) help tty
>  >    Set terminal for future runs of program being debugged.
>  >
>  > > The phrase "of program being debugged" seems redundant to me (what
>  other > > possibilities are there?).  It might be even more clear to say:
>  > >
>  > > Default terminal for future runs is "/dev/pts/1".
>  > >
>  > > since the redirection overrides this.
>  >
>  > I like your suggestion. There is still 1 ambiguity though. Is the
>  "Default > terminal for future runs" for GDB's I/O? or for the
>  inferior's I/O? I think > this question is why the phrase "program being
> debugged" is used. 
> 
> I guess thats the reason for "of program being debugged" and explains why
> it was a dumb suggestion.

  It's not an entirely dumb suggestion.  It's a clumsy piece of wording and
could do with being improved.  

  And since "program being debugged" == "inferior", I'd think the best
choice of wording would be ...

>    (gdb) help tty
>    Set terminal for future runs of inferior.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

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

end of thread, other threads:[~2005-07-12 14:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-11  2:13 show inferior-tty Nick Roberts
2005-07-11  3:32 ` Bob Rossi
2005-07-11 13:10   ` Daniel Jacobowitz
2005-07-11 21:28     ` Nick Roberts
2005-07-12  2:07   ` Nick Roberts
2005-07-12 11:41     ` Bob Rossi
2005-07-12 13:34       ` Nick Roberts
2005-07-12 14:07         ` Dave Korn

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).