This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug win32/14529] Make gdb capable of JIT-debugging on W32


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]