[RFA] Add NormalBreakpoint

Keith Seitz keiths@redhat.com
Fri Jun 15 21:23:00 GMT 2007

Tom Tromey wrote:
> Classic OO would be to put a method on the Breakpoint so the different
> types know how to handle themselves :-)

Yes, that is true, but I thought in this instance that polymorphism 
would make the code a whole lot more difficult to read (we'll have 
interpreter code in three separate files, not including interpret.cc). 
Nonetheless, I have recoded the whole thing using this more standard 

I'm also attaching a new ChangeLog, since I accidentally omitted all the 
regenerated files: they got lost by the classpath merge mess (forgot to 
commit the class files for the merge??).


2007-06-14  Keith Seitz  <keiths@redhat.com>

         * gnu/gcj/jvmti/Breakpoint.java: Make abstract.
         (method): Change from private to protected.
         (location): Likewise.
         (Breakpoint): Change argument list to take only integer type.
         Add default constructor.
         (initialize_native): Renamed to ...
         (_save_insn): ... this to make function more explicit.
         (execute): New method.
         * gnu/gcj/jvmti/Breakpoint.h: Regenerate.
         * gnu/gcj/jvmti/natBreakpoint.cc (initialize_native): Rename to...
         (_save_insn): ... this.
         (install): Save the original instruction.
         * gnu/gcj/jvmti/NormalBreakpoint.java: New file.
         * gnu/gcj/jvmti/NormalBreakpoint.h: New file.
         * gnu/gcj/jvmti/natNormalBreakpoint.cc: New file.
         * gnu/gcj/jvmti/BreakpointManager.java (newBreakpoint):
         Instantiate a NormalBreakpoint instead of Breakpoint.
         * interpret-run.cc (insn_breakpoint): Remove breakpoint actions
         and call Breakpoint.execute to do them.
         * classpath/lib/gnu/gcj/jvmti/Breakpoint.class: Regenerate.
         * classpath/lib/gnu/gcj/jvmti/BreakpointManager.class: Likewise.
         * classpath/lib/gnu/gcj/jvmti/NormalBreakpoint.class: New file.
         * sources.am: Regenerate.
         * Makefile.am (nat_source_files): Add natNormalBreakpoint.cc.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: normalbreakpoint-2.patch
Type: text/x-patch
Size: 6484 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070615/3bf89235/attachment.bin>

More information about the Java-patches mailing list