public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-pmuldoon-python-breakpoints: Add HAVE_PYTHON conditions, comments, renames and prepare for submission.
@ 2010-12-15 15:15 pmuldoon
  0 siblings, 0 replies; only message in thread
From: pmuldoon @ 2010-12-15 15:15 UTC (permalink / raw)
  To: archer-commits

The branch, archer-pmuldoon-python-breakpoints has been updated
       via  fd53e67047a19efb6ca81b43a6aa36013321a19a (commit)
      from  6943bb1bce50f5586eca1b3b86e2f5089ea7c72a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit fd53e67047a19efb6ca81b43a6aa36013321a19a
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Wed Dec 15 15:15:09 2010 +0000

    Add HAVE_PYTHON conditions, comments, renames and prepare for submission.

-----------------------------------------------------------------------

Summary of changes:
 gdb/breakpoint.c           |    9 +++++----
 gdb/doc/gdb.texinfo        |    2 +-
 gdb/python/py-breakpoint.c |    6 +++++-
 gdb/python/python.h        |    2 +-
 4 files changed, 12 insertions(+), 7 deletions(-)

First 500 lines of diff:
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 14eb77b..51251cf 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3968,11 +3968,12 @@ bpstat_check_breakpoint_conditions (bpstat bs, ptid_t ptid)
       int value_is_zero = 0;
       struct expression *cond;
 
-      /* Evaluate Python breakpoints that have an "evaluate"
-	 function implemented.  */
+#if HAVE_PYTHON
+      /* Evaluate Python breakpoints that have a "condition"
+	 method implemented.  */
       if (b->py_bp_object)
-	bs->stop = gdbpy_bp_evaluate (b->py_bp_object);
-
+	bs->stop = gdbpy_cond_evaluate (b->py_bp_object);
+#endif
       if (is_watchpoint (b))
 	cond = b->cond_exp;
       else
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index ee8e80c..82c1539 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -22872,7 +22872,7 @@ Return the symbol table's source absolute file name.
 @tindex gdb.Breakpoint
 
 Python code can manipulate breakpoints via the @code{gdb.Breakpoint}
-class.  
+class.
 
 @defmethod Breakpoint __init__ spec @r{[}type@r{]} @r{[}wp_class@r{]} @r{[}internal@r{]}
 Create a new breakpoint.  @var{spec} is a string naming the
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 9695c00..32ebfae 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -697,8 +697,12 @@ gdbpy_breakpoints (PyObject *self, PyObject *args)
   return PyList_AsTuple (list);
 }
 
+/* Evaluate the "condition" method (if implemented) in
+   the breakpoint class.  If the method returns True, the inferior
+   will be stopped at the breakpoint.  Otherwise the inferior will be
+   allowed to continue.  */
 int
-gdbpy_bp_evaluate (struct breakpoint_object *bp_obj)
+gdbpy_cond_evaluate (struct breakpoint_object *bp_obj)
 {
   struct cleanup *cleanup = ensure_python_env (get_current_arch (),
 					       current_language);
diff --git a/gdb/python/python.h b/gdb/python/python.h
index 9b2298e..53552c6 100644
--- a/gdb/python/python.h
+++ b/gdb/python/python.h
@@ -43,6 +43,6 @@ void preserve_python_values (struct objfile *objfile, htab_t copied_types);
 
 void load_auto_scripts_for_objfile (struct objfile *objfile);
 
-int gdbpy_bp_evaluate (struct breakpoint_object *bp_obj);
+int gdbpy_cond_evaluate (struct breakpoint_object *bp_obj);
 
 #endif /* GDB_PYTHON_H */


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-15 15:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-15 15:15 [SCM] archer-pmuldoon-python-breakpoints: Add HAVE_PYTHON conditions, comments, renames and prepare for submission pmuldoon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).