Date: Thu, 28 Jan 1999 11:25:35 -0500 (EST) From: "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com> To: marko@uk.radan.com (Mark Ovens) Cc: questions@FreeBSD.ORG Subject: Re: [2nd attempt] Basic help with gdb Message-ID: <199901281625.LAA20121@cc942873-a.ewndsr1.nj.home.com> In-Reply-To: <36B084E5.E4B99645@uk.radan.com> from Mark Ovens at "Jan 28, 99 03:40:21 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Mark Ovens wrote, > I didn't get any response the first time I asked this, so I'll try > again. > > I'm trying to learn how to use gdb and can't seem to get the > ``-tty=<device>'' option to work. I do not have a fix, but rather just gave this a shot myself. Here's my experience. > OK, I start 2 shell windows, ttyp1 and ttyp2. I have two xterms owned by the same user, ttyp7 and ttyp9. > Start gdb in ttyp1 with ``gdb -tty=/dev/ttyp2 prog''. I hacked up an existing program leaving only the I/O routines (some printf() and scanf()s). Then I started in ttyp7, gdb -tty=/dev/ttyp9 _test_io > I get the ``(gbd)'' prompt. Me too. > Type ``r'' Well, I typed 'run.' ;) > but then get an error in *ttyp2* ``cannot use /dev/tty for input'' > (note it says ``tty'' not ``ttyp2''). Now things differ. The first prompt from my program pops out from behind the shell prompt in ttyp9. It is working. However, I enter some input, and it goes to the shell rather than the program. But the next line of input _does_ go to the program, but there is no local echo of my typing on ttyp9. The program steals the input at ttyp9 from the shell running there until the program exits, when the shell gets control back. The program funtions normally. I guess I'm saying it pretty much works for me. If I really needed to, I could try to figure out a way to get the shell out of the picture and get the local echo. > I'm using shelltool(1) under olvwm for this but I get the same problem > if I use xterms or the console (ttyv[012]). I'm just using xterms under twm (yes, I do like twm). Nothin' fancy. > How do you make this work? Can anyone help? I'm not sure what to tell you... Maybe just check 'ls -l tty{,p*}.' Try to figure out what is different between our systems? -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901281625.LAA20121>