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: [patch] [python] Implement stop_p for gdb.Breakpoint


>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:

Phil> +#if HAVE_PYTHON
Phil> +#include "python/python.h"
Phil> +#endif

You can include this header without the #if.
It is designed to work properly even if Python support is not enabled.

Phil> +#if HAVE_PYTHON
Phil> +      /* Evaluate Python breakpoints that have a "condition"
Phil> +	 method implemented.  */
Phil> +      if (b->py_bp_object)
Phil> +	bs->stop = gdbpy_stop_p (b->py_bp_object);
Phil> +#endif

I think you should remove the #if here and have a second implementation
of gdbpy_stop_p that just calls internal_error.  The idea here is that
py_bp_object can only be non-NULL if Python support was actually enabled.

Per the other message, just drop the log-printf stuff from the
submission for now.  We can submit it, or not, later on.  (I think we
should still put it in Fedora though.)

The rest of the code bits look good to me.

Tom


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