From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9515 invoked by alias); 11 Sep 2012 18:30:55 -0000 Received: (qmail 9492 invoked by uid 22791); 11 Sep 2012 18:30:52 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_DB,TW_TD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Sep 2012 18:30:35 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8BIUYfk002304 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Sep 2012 14:30:34 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q8BIUW6b023976; Tue, 11 Sep 2012 14:30:33 -0400 Message-ID: <504F8347.8030005@redhat.com> Date: Tue, 11 Sep 2012 18:30:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: LRN CC: gdb-patches@sourceware.org Subject: Re: [Bug win32/14529] Make gdb capable of JIT-debugging on W32 References: <503E575D.1000608@gmail.com> <83y5kvp0za.fsf@gnu.org> <5040DA38.2070802@gmail.com> <504D4EE1.5010507@gmail.com> <504F811C.8000409@redhat.com> <504F8260.5060900@gmail.com> In-Reply-To: <504F8260.5060900@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00171.txt.bz2 On 09/11/2012 07:26 PM, LRN wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 11.09.2012 22:21, Pedro Alves wrote: >> On 09/10/2012 03:22 AM, LRN wrote: >>> >>> +# This feature requires 3 things: +# 1) windows.h with >>> SetEvent() and CloseHandle() prototypes +# 2) inttypes.h with >>> uintptr_t type defined +# 3) libkernel32 that exports SetEvent() >>> and CloseHandle() +# Because functions in (1) use stdcall on W32, >>> it's impossible to +# check them with AC_SEARCH_LIBS. +# Until a >>> more elaborate check is written (compile_ifelse or something), +# >>> users will have to enable this feature explicitly. +# However, >>> this feature is enabled by default for platforms where it should >>> +# normally work (MinGW and Cygwin). + >>> +AC_ARG_ENABLE(w32-jitdbg, +AS_HELP_STRING([--enable-w32-jitdbg], >>> [enable W32 JIT debugging]), + [case $enableval in + yes) >>> w32_jitdbg=1 ;; + no) w32_jitdbg=0 ;; + *) + >>> AC_MSG_ERROR([bad value $enableval for --enable-w32-jitdbg]) ;; + >>> esac], + [w32_jitdbg=$default_w32_jitdbg]) >>> +AC_DEFINE_UNQUOTED(W32_JITDBG, $w32_jitdbg, + [Define to 1 if >>> W32 JIT debugging support is enabled, to 0 otherwise]) + >> >> When would you ever want to --enable-w32-jitdbg on anything other >> than Windows, where it is enabled by default? >> > No idea. But i like things to have built-in overrides, in case you > need to do something that the developer have not foresaw. Better than > patching gdb in that case. --enable-w32-jitdbg makes gdb include windows.h, and call Windows functions. To make this work anywhere else will always require gdb patching. I'd vote for less-is-more until we find a need. :-) -- Pedro Alves