[Python-3000] Windows: debug mode
lists at cheimes.de
Sun Feb 17 15:23:17 CET 2008
Giovanni Bajo wrote:
> Python's debug mode under Windows mandates an ABI change: the debug
> version of dynamic libraries (_d) are linked against the CRT debug
> runtime, which is not ABI-compatible to the release runtime. So you
> either have the _d version of all the extensions you need or you can't
> even start your program in debug mode. I believe this started back in the
> days where Python programs were small, had only a couple of dependencies,
> and most developers were also core developers (core developers are
> probably the only ones that can succesfully use the current debug mode).
Python's Py_DEBUG mode adds lots of extra checks which require an ABI
change. For example in debug mode memory allocation and and reference
counting do extra checks etc. In release mode those extra checks are
either disabled or they are replaced by much simpler and faster macros.
It *may* be possible to add the extra functions to the Python library so
that a debug build can also load release libraries. It's a complex and
time consuming task.If you want to invest your time I'm fine with
enhancing the situation for Windows developers. But keep in mind that
any change must neither slow down Python in release mode nor make the
debug mode harder to use for a core developer! Windows issue must not
place an extra burden on Unix users.
More information about the Python-3000