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: [RFA/Python] Fix procfs.c build failure on 32bit solaris (_FILE_OFFSET_BITS)


>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:

Pedro>     /* With a Python scripting enabled GDB, store a reference to the
Pedro>        Python object that has been associated with this breakpoint.
Pedro>        This is always NULL for a GDB that is not script enabled.  It
Pedro>        can sometimes be NULL for enabled GDBs as not all breakpoint
Pedro>        types are tracked by the Python scripting API.  */
Pedro>     PyObject *py_bp_object;

Pedro> Given that we only need to hold a pointer to this, thus the PyObject
Pedro> need not be complete at this point, can we forward declare PyObject
Pedro> instead somehow?

Python defines it as a typedef for "struct _object *".  Yuck -- I'd
rather not copy that into our code.

Pedro> If not, can we perhaps come up with a wrapper type that itself
Pedro> can be forward declared?  Or fallback to void* if nothing else
Pedro> cleaner is possible?

Either of these works for me.

Pedro> The advantage would be that python-internal.h would then only be
Pedro> included in the specific modules that require it, in other words,
Pedro> it would be moved to breakpoint.c.

I think this would be good.  Python has turned out to be unclean enough
that it is better to work around its problems systematically.

Tom


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