This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Learning gdb


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]