Thread: [Cgdb-devel] CTRL + T
Brought to you by:
bobbybrasko,
crouchingturbo
From: Peter K. <pe...@ko...> - 2003-02-02 21:52:38
|
Okay, what on earth is the purpose for ctrl+t? The help documentation says:=20 Control-T -> Opens a new tty for the debugged program But for the life of me I can't tell the difference between this and: =20 T -> Opens a window to give input to the debugged program It seems to allocate a new screen, (I'm not sure if its a brand spanking new tty, because its using the same /dev/pts entry). Can one of these disappear? - Peter --=20 Peter D. Kovacs <pe...@ko...> |
From: Bob R. <bob...@co...> - 2003-02-02 22:44:01
|
Here's the deal. gdb outputs its data via stdout and the debugged program's date via stdout. So cgdb really has no way of knowing which output is from gdb and which is from the debugged program.=20 So, in order to distinguish between the 2, cgdb uses gdb's tty feature which tells gdb to use the tty specified for all input and output of the debugged program. That way cgdb reads the debugged programs output via the tty specified and gdb's output via stdout. So, the Control-T command actually tells cgdb to open a new tty ( ex. /dev/pts/3). Then it issues the command to gdb ( tty /dev/pts/3 ). So, if something is wrong with the tty, the user can just get another one. The T command actually is just a GUI command. It says, I want to look at all the input and output to gdb in a new window. Actually, the only way currently to give input to the program, is through the T command. All it does is says, write all data typed in this window to the tty instead of gdb's stdin. Is this clear at all? Let me know. Bobby On Sun, Feb 02, 2003 at 04:52:23PM -0500, Peter Kovacs wrote: > Okay, what on earth is the purpose for ctrl+t? The help documentation > says:=20 >=20 > Control-T -> Opens a new tty for the debugged program >=20 > But for the life of me I can't tell the difference between this and: > =20 > T -> Opens a window to give input to the debugged program >=20 > It seems to allocate a new screen, (I'm not sure if its a brand spanking > new tty, because its using the same /dev/pts entry). Can one of these > disappear? >=20 > - Peter >=20 > --=20 > Peter D. Kovacs <pe...@ko...> |
From: Peter K. <pe...@ko...> - 2003-02-02 22:53:06
|
Okay, then basically we need 3 things: 1. TTY toggle - shows and hids the TTY window 2. TTY focus - if the tty is on the screen, sets the focus. 3. restart TTY - create a new pseudo-terminal and issue the tty command. Does that seem complete? I'm trying to move away from hard-coded key-bindings to a more functional description. - Peter On Sun, Feb 02, 2003 at 05:43:58PM -0500, Bob Rossi wrote: > Here's the deal. gdb outputs its data via stdout and the debugged > program's date via stdout. So cgdb really has no way of knowing which > output is from gdb and which is from the debugged program.=20 >=20 > So, in order to distinguish between the 2, cgdb uses gdb's tty feature > which tells gdb to use the tty specified for all input and output of > the debugged program. That way cgdb reads the debugged programs output > via the tty specified and gdb's output via stdout. >=20 > So, the Control-T command actually tells cgdb to open a new tty ( ex. > /dev/pts/3). Then it issues the command to gdb ( tty /dev/pts/3 ). So, > if something is wrong with the tty, the user can just get another one. >=20 > The T command actually is just a GUI command. It says, I want to look at > all the input and output to gdb in a new window. Actually, the only way > currently to give input to the program, is through the T command. All > it does is says, write all data typed in this window to the tty instead > of gdb's stdin. --=20 Peter D. Kovacs <pe...@ko...> |
From: Bob R. <bob...@co...> - 2003-02-02 23:06:53
|
That sounds good to me.=20 Bobby On Sun, Feb 02, 2003 at 05:52:43PM -0500, Peter Kovacs wrote: > Okay, then basically we need 3 things: > 1. TTY toggle - shows and hids the TTY window > 2. TTY focus - if the tty is on the screen, sets the focus. > 3. restart TTY - create a new pseudo-terminal and issue the tty > command. >=20 > Does that seem complete? I'm trying to move away from hard-coded > key-bindings to a more functional description. >=20 > - Peter >=20 > On Sun, Feb 02, 2003 at 05:43:58PM -0500, Bob Rossi wrote: > > Here's the deal. gdb outputs its data via stdout and the debugged > > program's date via stdout. So cgdb really has no way of knowing which > > output is from gdb and which is from the debugged program.=20 > >=20 > > So, in order to distinguish between the 2, cgdb uses gdb's tty feature > > which tells gdb to use the tty specified for all input and output of > > the debugged program. That way cgdb reads the debugged programs output > > via the tty specified and gdb's output via stdout. > >=20 > > So, the Control-T command actually tells cgdb to open a new tty ( ex. > > /dev/pts/3). Then it issues the command to gdb ( tty /dev/pts/3 ). So, > > if something is wrong with the tty, the user can just get another one. > >=20 > > The T command actually is just a GUI command. It says, I want to look at > > all the input and output to gdb in a new window. Actually, the only way > > currently to give input to the program, is through the T command. All > > it does is says, write all data typed in this window to the tty instead > > of gdb's stdin. >=20 > --=20 > Peter D. Kovacs <pe...@ko...> |