Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Tue, 20 Jan 2004 18:16:08 -0500
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: some notes on debugging screen (long) (was: cygwin-1.5.6-1 Vim now broken)
Message-ID: <20040120231608.GA15350@redhat.com>
Mail-Followup-To: cygwin@cygwin.com
References: <20040120171119.GA25428@redhat.com> <Law9-OE28sACIzKxJHW00015564@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Law9-OE28sACIzKxJHW00015564@hotmail.com>
User-Agent: Mutt/1.4.1i
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com

On Tue, Jan 20, 2004 at 09:59:21AM -0800, Rafael Kitover wrote:
>You will not be able to use gdb on a screen binary directly, as you
>will get a "must be connected to terminal" error, use something like:

This isn't necessary.  You should be able to:

c:\>set CYGWIN=notty
c:\>gdb screen.exe
(gdb) set env CYGWIN=tty
(gdb) run

>----
>#!/bin/sh
>echo gdb --pid=$$ --directory=/path-to-screen-source/screen-3.9.13/ \
>  --se=/path-to-unstripped-screen-binary/screen.exe
>read akey
>/path-to-unstripped-screen-binary/screen.exe
>----
>
>then run the gdb command this script prints out in another terminal
>
>You can also try using insight, the GUI version of GDB.
>
>Make sure you "set follow-fork-mode child" in gdb, or parent, depending on which part of screen you're trying to follow.

AFAIK, follow-fork mode doesn't work all that well in gdb for windows.

If you configure cygwin with --enable-debugging then you can set a
windows environment variable CYGWIN_DEBUG=screen and cygwin will pop
up a debugger whenever screen is run.

>Using symbol-file /install/bin/cygwin1.dll should let you step into the Cygwin dll. (cd to the appropriate source directory).

or use the 'dll cygwin1' command.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

