Subject: Re: Debugging running processes
From: [email-masked] (Benoit Papillault)

5 Jun 1998 11:22:33 -0700
Message-ID: <Pine.GSO.3.96.980604192539.659E-100000.cygnus.gnu-win32@parakeet>
References: <F3332E1142DFD111873E0000F879A2BA0FACF2@NTMAIL>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Ian Collins <[email-masked]>
Cc: "'Gnu Mailing list'" <[email-masked]>

On Thu, 4 Jun 1998, Ian Collins wrote:

> Is there any way to attach gdb to a running process on gnu-win32 as you
> can on Unix?

Yes, you can, you have to get the process id of your process first (either
by using the ps program provided with GNUWin32, under the WIN32-PID column
or you can do a small program using CreateToolhelp32Snapshot(),
GetProcess32First(), GetProcess32Next() under Windows95 or via the
registry under Windows NT). The disadvantage of the ps version provided
with GNUWin32 is that it shows you only the pid for processes using the
cygwin dll. You can use gdb on (nearly) any process. I have tried on
notepad and it works. But if you do that you will not get any symbolic
information. Are you interested in doing this?

	Benoit Papillault

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".