[patch] Add an evaluation function hook to Python breakpoints.

Tom Tromey tromey@redhat.com
Wed Dec 15 20:51:00 GMT 2010


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

Phil> +  struct cleanup *cleanup = ensure_python_env (get_current_arch (),
Phil> +					       current_language);

I didn't notice this before.  I think this should use the breakpoint's
arch and language.

Phil> +  if (PyObject_HasAttrString (py_bp, method))
Phil> +    {
Phil> +      PyObject *result = PyObject_CallMethod (py_bp, method, NULL);

Since we're now overloading the "condition" member, what happens if the
user sets a condition on the breakpoint?

I think we may need an additional check here, to see if the "condition"
member is a callable object.

Tom



More information about the Gdb-patches mailing list