Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com Date: Fri, 30 Apr 1999 17:36:57 +0400 From: Egor Duda X-Mailer: The Bat! (v1.029) S/N A0F2A05A Reply-To: Egor Duda Organization: DEO Message-ID: <4733.990430@logos-m.ru> To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re[2]: gdb "attach" and sharing thread info between processes References: <19990429130121 DOT A12386 AT cygnus DOT com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------109641AC63FAD72" ------------109641AC63FAD72 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! CF> The recently announced gdb 4.18 should have the ability to attach to CF> a running process and manipulate threads. CF> You can get the sources from CF> ftp://sourceware.cygnus.com/pub/gdb/releases/gdb-4.18.tar.bz2 . Thanks, it really works. The only drawback I encountered is that it fails to load dll symbols when attaching to process. According to comments in win32-nat.c that's because gdb cannot retrieve full dll file name. Microsoft provide special dll -- psapi.dll http://msdn.microsoft.com/library/sdkdoc/winbase/psapi_0bjn.htm which provides all needed functionality. Alas, this method works under NT only. Moreover -- this dll is nonstandard -- it's not available in common NT distribution (though it's included in ResKit). Below is a patch for gdb-4.18 to make it use psapi.dll, if possible. I'm also planning to make a patch to winsup, which would allow to handle exceptions by starting debugger. i think it would be acceptable substitution for core files functionality. What do you think about usefulness of such patch? Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19 ------------109641AC63FAD72 Content-Type: application/x-gzip; name="win32-nat.diff.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="win32-nat.diff.gz" H4sICK6uKTcAC3dpbjMyLW5hdC5kaWZmALVWa0/jRhT9jH/F3VRd4jyAJLRbQllttgmFKiQIgqi0 i6zBHiejtT3ReLws3eW/986M7djBBKhUK1Lsmfs4c+7cR7vdhjsW9brtiMgdLth8a5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