Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jan 1999 11:47:20 +0000
From:      Mark Ovens <marko@uk.radan.com>
To:        questions@FreeBSD.ORG
Subject:   Basic help with gdb
Message-ID:  <36ADAB48.AC4CAB14@uk.radan.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36ADAB48.AC4CAB14>