[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: debugging ncurses code with gdb
From: |
Peter Jay Salzman |
Subject: |
Re: debugging ncurses code with gdb |
Date: |
Wed, 4 Feb 2004 15:48:37 -0800 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On Wed 04 Feb 04, 9:56 AM, Thomas Dickey <address@hidden> said:
> On Wed, 4 Feb 2004, Peter Jay Salzman wrote:
>
> > Hi all,
> >
> > While debugging ncurses code, I need to separate out GDB I/O from
> > ncurses I/O by:
> >
> > 1. opening up a 2nd xterm
> > 2. finding its pty with "tty" or "who am i"
> > 3. using GDB's "tty" command to redirect program I/O.
> >
> > or if i'm on virtual consoles, finding the tty device rather than pty
> > device.
> >
> > I'm on GNU/Linux. Is the procedure the same for other flavors of Unix?
>
> Even simpler - just use "attach" (process) from the other terminal,
> and leave the tty alone.
unless you want to debug from the start of the program -- you'd probably
need a getchar() at the beginning of the program in order to get it at
the very top of the executable... :)
> > Are there any other issues to be aware of when debugging ncurses
> > programs using a symbolic debugger like GDB?
>
> none that come to mind.
thanks for the attach tip. i hadn't thought of that!
pete
--
Make everything as simple as possible, but no simpler. -- Albert Einstein
GPG Instructions: http://www.dirac.org/linux/gpg
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D