1 diff -u -r jamvm-1.4.2/src/excep.c vmlog-jamvm-1.4.2/src/excep.c
2 --- jamvm-1.4.2/src/excep.c 2005-12-31 08:12:55.000000000 +0100
3 +++ vmlog-jamvm-1.4.2/src/excep.c 2006-03-12 00:42:34.000000000 +0100
8 +#include <vmlog_jamvm.h>
10 extern char VM_initing;
12 static Class *ste_class, *ste_array_class, *throw_class, *vmthrow_class;
16 getExecEnv()->exception = exp;
17 + vmlog_jamvm_throw(getExecEnv()->thread,exp);
23 void setException(Object *exp) {
24 getExecEnv()->exception = exp;
25 + vmlog_jamvm_throw(getExecEnv()->thread,exp);
28 void clearException() {
29 ExecEnv *ee = getExecEnv();
32 + vmlog_jamvm_catch(ee->thread,ee->exception);
36 ee->stack_end -= STACK_RED_ZONE_SIZE;
38 while(((handler_pc = findCatchBlockInMethod(frame->mb, exception, frame->last_pc)) == NULL)
39 && (frame->prev->mb != NULL)) {
41 + vmlog_jamvm_unwnd_method(getExecEnv()->thread,frame->mb);
43 if(frame->mb->access_flags & ACC_SYNCHRONIZED) {
44 Object *sync_ob = frame->mb->access_flags & ACC_STATIC ?
45 (Object*)frame->mb->class : (Object*)frame->lvars[0];
46 diff -u -r jamvm-1.4.2/src/frame.h vmlog-jamvm-1.4.2/src/frame.h
47 --- jamvm-1.4.2/src/frame.h 2005-09-05 02:02:45.000000000 +0200
48 +++ vmlog-jamvm-1.4.2/src/frame.h 2006-03-14 00:26:07.000000000 +0100
51 new_frame->prev = dummy; \
52 ee->last_frame = new_frame; \
53 + vmlog_jamvm_enter_method(ee->thread,mb); \
56 #define POP_TOP_FRAME(ee) \
57 + if (ee->exception) \
58 + vmlog_jamvm_unwnd_method(ee->thread,mb); \
60 + vmlog_jamvm_leave_method(ee->thread,mb); \
61 ee->last_frame = ee->last_frame->prev->prev;
62 diff -u -r jamvm-1.4.2/src/interp.c vmlog-jamvm-1.4.2/src/interp.c
63 --- jamvm-1.4.2/src/interp.c 2006-01-22 23:32:38.000000000 +0100
64 +++ vmlog-jamvm-1.4.2/src/interp.c 2006-03-13 04:21:48.000000000 +0100
69 +#include "vmlog_jamvm.c"
71 uintptr_t *executeJava() {
73 ExecEnv *ee = getExecEnv();
76 ee->last_frame = new_frame;
78 + vmlog_jamvm_enter_method(ee->thread,new_mb);
80 if(new_mb->access_flags & ACC_SYNCHRONIZED) {
81 sync_ob = new_mb->access_flags & ACC_STATIC ? (Object*)new_mb->class : (Object*)*arg1;
83 @@ -2229,6 +2233,11 @@
84 ostack = (*(uintptr_t *(*)(Class*, MethodBlock*, uintptr_t*))
85 new_mb->native_invoker)(new_mb->class, new_mb, arg1);
87 + if (exceptionOccured0(ee))
88 + vmlog_jamvm_unwnd_method(ee->thread,new_mb);
90 + vmlog_jamvm_leave_method(ee->thread,new_mb);
93 objectUnlock(sync_ob);
99 + vmlog_jamvm_leave_method(ee->thread,mb);
101 if(mb->access_flags & ACC_SYNCHRONIZED) {
102 Object *sync_ob = mb->access_flags & ACC_STATIC ? (Object*)mb->class : this;
103 objectUnlock(sync_ob);
104 @@ -2294,6 +2305,8 @@
108 + vmlog_jamvm_catch(ee->thread,excep);
110 /* If we're handling a stack overflow, reduce the stack
111 back past the red zone to enable handling of further
113 diff -u -r jamvm-1.4.2/src/jam.c vmlog-jamvm-1.4.2/src/jam.c
114 --- jamvm-1.4.2/src/jam.c 2006-01-17 01:36:59.000000000 +0100
115 +++ vmlog-jamvm-1.4.2/src/jam.c 2006-03-13 04:32:16.000000000 +0100
120 +#include <vmlog_jamvm.h>
122 /* Setup default values for command line args */
124 static int noasyncgc = FALSE;
129 + vmlog_jamvm_init(&argc,argv);
131 int class_arg = parseCommandLine(argc, argv);