X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: strace -vs- cygload funny Date: Tue, 25 Jul 2006 18:47:20 +0100 Message-ID: <007c01c6b012$6105d570$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com So, how come strace works properly? According to how-cygtls, " If you load cygwin1.dll dynamically from a non-cygwin application, it is vital that the bottom CYGTLS_PADSIZE bytes of the stack are not in use before you call cygwin_dll_init(). See winsup/testsuite/cygload for more information. " What that doesn't make clear is whether calling cygwin_dll_init is compulsory, or optional. What strace.cc does is to LoadLibrary the cygwin dll, without making any provision for padding on the stack. But it never calls cygwin_dll_init - at least, not explicitly. It does, however, call cygwin_internal for CW_CYGWIN_PID_TO_WINPID, CW_STRACE_TOGGLE, and CW_ARGV. Is this OK? cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/