From owner-freebsd-questions Tue Jan 26 03:48:22 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA20460 for freebsd-questions-outgoing; Tue, 26 Jan 1999 03:48:22 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from post.mail.demon.net (finch-post-10.mail.demon.net [194.217.242.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA20455 for ; Tue, 26 Jan 1999 03:48:20 -0800 (PST) (envelope-from marko@uk.radan.com) Received: from [158.152.75.22] (helo=uk.radan.com) by post.mail.demon.net with smtp (Exim 2.10 #1) id 1056ya-0003Gb-00 for questions@freebsd.org; Tue, 26 Jan 1999 11:48:13 +0000 Organisation: Radan Computational Ltd., Bath, UK. Phone: +44-1225-320320 Fax: +44-1225-320311 Received: from beavis.uk.radan.com (beavis [193.114.228.122]) by uk.radan.com (8.6.10/8.6.10) with SMTP id LAA02431 for ; Tue, 26 Jan 1999 11:47:46 GMT Received: from uk.radan.com (gppsun4) by beavis.uk.radan.com (4.1/SMI-4.1) id AA04395; Tue, 26 Jan 99 11:47:44 GMT Message-Id: <36ADAB48.AC4CAB14@uk.radan.com> Date: Tue, 26 Jan 1999 11:47:20 +0000 From: Mark Ovens Organization: Radan Computational Ltd X-Mailer: Mozilla 4.5 [en] (X11; I; SunOS 4.1.3_U1 sun4m) X-Accept-Language: en-GB Mime-Version: 1.0 To: questions@FreeBSD.ORG Subject: Basic help with gdb Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm trying to learn how to use gdb and have got a fairly basic problem that I can't seem to get round. I've got Greg's book, Porting Unix Software, which shows how to use gdb. Unfortunately he uses xterm as the example prog to debug, which of course runs in it's own window. However I'm wanting to debug a CLI app and therefore need the app to run in a different window to the debugger (so I can input debugger commands), so I checked the manpage and found there is a ``-tty='' option to use a different device as the app's STDIO. OK, I start 2 shell windows, ttyp1 and ttyp2. Start gdb in ttyp1 with ``gdb -tty=/dev/ttyp2 prog''. I get the ``(gbd)'' prompt. Type ``r'' but then get an error in *ttyp2* ``cannot use /dev/tty for input'' (note it says ``tty'' not ``ttyp2''). I'm using shelltool(1) under olvwm for this but I get the same problem if I use xterms or the console (ttyv[012]). How do you make this work? Can anyone help? Thanks To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message