BreakpointManager.java (newBreakpoint): Install the new breakpoint into the bytecode.
authorKeith Seitz <keiths@redhat.com>
Fri, 20 Apr 2007 17:08:44 +0000 (17:08 +0000)
committerKeith Seitz <kseitz@gcc.gnu.org>
Fri, 20 Apr 2007 17:08:44 +0000 (17:08 +0000)
        * gnu/gcj/jvmti/BreakpointManager.java (newBreakpoint):
        Install the new breakpoint into the bytecode.
        (deleteBreakpoint): Remove the breakpoint from the bytecode.
        * classpath/lib/gnu/gcj/jvmti/BreakpointManager.class:
        Regenerate.
        * gnu/gcj/jvmti/natBreakpoint.cc (initialize_native):
        Don't install the breakpoint here.

From-SVN: r123997

libjava/ChangeLog
libjava/classpath/lib/gnu/gcj/jvmti/BreakpointManager.class
libjava/gnu/gcj/jvmti/BreakpointManager.java
libjava/gnu/gcj/jvmti/natBreakpoint.cc

index 6e916a71b63735d98ab1db0a3c201985547b3759..b29a44312e285f26dc1d09732883a8f300cd2407 100644 (file)
@@ -1,3 +1,13 @@
+2007-04-20  Keith Seitz  <keiths@redhat.com>
+
+       * gnu/gcj/jvmti/BreakpointManager.java (newBreakpoint):
+       Install the new breakpoint into the bytecode.
+       (deleteBreakpoint): Remove the breakpoint from the bytecode.
+       * classpath/lib/gnu/gcj/jvmti/BreakpointManager.class:
+       Regenerate.
+       * gnu/gcj/jvmti/natBreakpoint.cc (initialize_native):
+       Don't install the breakpoint here.
+
 2007-04-19  Keith Seitz  <keiths@redhat.com>
 
        * interpret-run.cc [insn_breakpoint]: Save the original
index c0bf97744a7bae1853f82a34011a43f0c451320e..2f35c7fbee47867ac7314abbc6ca628260a44b8c 100644 (file)
Binary files a/libjava/classpath/lib/gnu/gcj/jvmti/BreakpointManager.class and b/libjava/classpath/lib/gnu/gcj/jvmti/BreakpointManager.class differ
index 205bf6d8a5bea7b22a4bb77a64783d6deaee2c07..5ef1b08d4df011ed58111a6279fbdcb6b770732f 100644 (file)
@@ -1,6 +1,6 @@
 // BreakpointManager.java - A convenience class for dealing with breakpoints
 
-/* Copyright (C) 2006  Free Software Foundation
+/* Copyright (C) 2006, 2007  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -45,6 +45,7 @@ public class BreakpointManager
   {
     Breakpoint bp = new Breakpoint (method, location);
     Location loc = new Location (method, location);
+    bp.install ();
     _instance._breakpoints.put (loc, bp);
     return bp;
   }
@@ -58,7 +59,12 @@ public class BreakpointManager
   public static void deleteBreakpoint (long method, long location)
   {
     Location loc = new Location (method, location);
-    _instance._breakpoints.remove (loc);
+    Breakpoint bp = (Breakpoint) _instance._breakpoints.get (loc);
+    if (bp != null)
+      {
+       bp.remove ();
+       _instance._breakpoints.remove (loc);
+      }
   }
 
   /**
index ab9de417bb8c1c3705af0176d5f61c438f9dbf24..2a85a939b92bae793e1018d99ab2f45b2e231787 100644 (file)
@@ -1,6 +1,6 @@
 // natBreakpoint.cc - C++ side of Breakpoint
 
-/* Copyright (C) 2006  Free Software Foundation
+/* Copyright (C) 2006, 2007  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -39,7 +39,6 @@ gnu::gcj::jvmti::Breakpoint::initialize_native ()
   pc_t code = imeth->get_insn (location);
   data = (RawDataManaged *) JvAllocBytes (sizeof (*code));
   memcpy (data, code, sizeof (*code));
-  install ();
 }
 
 void