This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Learning gdb
- From: Marco Molteni <molter at tin dot it>
- To: Russell Shaw <rjshaw at netspace dot net dot au>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 27 Dec 2004 19:08:34 +0100
- Subject: Re: Learning gdb
- References: <41CD4BE3.6040802@netspace.net.au>
On Sat, 25 Dec 2004 22:15:47 +1100
Russell Shaw <rjshaw@netspace.net.au> wrote:
[..]
> What's a good way of printing messages from my own printfs in the
> source without getting the output mixed up with the console output
> of gdb? (in an x-windows environment)
man gdb:
-tty=device
Run using device for your program's standard input and output.
so in the xterm you want to use for your printfs, you issue the "tty"
command and use the value you get for gdb:
molter@gattaccio[~]$ tty
/dev/ttyp1
on another xterm:
gdb -tty=/dev/ttyp1
marco
--
Very graphic, classical but efficient.