This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Bug win32/14529] Make gdb capable of JIT-debugging on W32
- From: Pedro Alves <palves at redhat dot com>
- To: LRN <lrn1986 at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 11 Sep 2012 19:30:31 +0100
- 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>
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