OSDN Git Service

* python/py-breakpoint.c (gdbpy_breakpoint_deleted): Ensure GIL is
authortromey <tromey>
Thu, 13 Oct 2011 14:54:12 +0000 (14:54 +0000)
committertromey <tromey>
Thu, 13 Oct 2011 14:54:12 +0000 (14:54 +0000)
always released.

gdb/ChangeLog
gdb/python/py-breakpoint.c

index aa8a105..2251b08 100644 (file)
@@ -1,5 +1,10 @@
 2011-10-13  Tom Tromey  <tromey@redhat.com>
 
+       * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Ensure GIL is
+       always released.
+
+2011-10-13  Tom Tromey  <tromey@redhat.com>
+
        * python/py-type.c (typy_has_key): Make 'field' const.
 
 2011-10-13  Luis Machado  <lgustavo@codesourcery.com>
index 3dc0fca..87265e2 100644 (file)
@@ -841,15 +841,15 @@ gdbpy_breakpoint_deleted (struct breakpoint *b)
 
   state = PyGILState_Ensure ();
   bp = get_breakpoint (num);
-  if (! bp)
-    return;
-
-  bp_obj = bp->py_bp_object;
-  if (bp_obj)
+  if (bp)
     {
-      bp_obj->bp = NULL;
-      --bppy_live;
-      Py_DECREF (bp_obj);
+      bp_obj = bp->py_bp_object;
+      if (bp_obj)
+       {
+         bp_obj->bp = NULL;
+         --bppy_live;
+         Py_DECREF (bp_obj);
+       }
     }
   PyGILState_Release (state);
 }