[Python-Dev] Debug entry points for PyMalloc

Martin v. Loewis martin@v.loewis.de
22 Mar 2002 20:51:30 +0100


Michael Hudson <mwh@python.net> writes:

> > Is something extraordinary required to make that possible?  I had in mind
> > nothing fancier than
> > 
> > extern void _PyMalloc_DebugCheckAddress(void* p);
> 
> Dunno.  I ought to learn how to use gdb properly.

That should work fine from gdb. You need a well-known entry point
(i.e. no macros), and you need "scalar" arguments (i.e. no memory
allocation, structures, etc). Passing void* works fine if you know the
integer value of the address.

Regards,
Martin