Re: [dwm] debugger poll

From: Ross Mohn <rpmohn_AT_waxandwane.org>
Date: Wed, 11 Jun 2008 13:45:54 -0400

On Wed, Jun 11, 2008 at 03:50:02PM +0200, Rainer Müller wrote:
> Ross Mohn wrote:
>> 1. What debugger do you use for C programming?
>
> gdb, sometimes cgdb [1].
>
>> 2. What debugger do you use for Curses C programming?
>
> gdb.
>
> Usually input and output for gdb and your program is mixed in one terminal,
> but you can also use a second one. Have a look at the tty command in gdb.
>
> Here is a quick HOWTO:
> 1) Open a second terminal, get the tty device:
> $ tty
> /dev/ttys007
>
> 2) Put this terminal to sleep so nothing else will happen while debugging:
> $ sleep 1000000
>
> 3) In gdb, set the tty to the previously obtained tty device:
> (gdb) tty /dev/ttys007
>
> 4) Run the program as usual:
> (gdb) r
>
> Input and output will happen on the second terminal, while you can easily
> debug in gdb as usual.
>
> HTH,
> Rainer
>
> [1] http://cgdb.sourceforge.net/

I had tried this approach about a year ago, with varied success, but I
may take it for another test drive. Thanks!

-RPM
Received on Wed Jun 11 2008 - 19:46:30 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:48:35 UTC