Difference between revisions of "Interfacing the Debugger"
m (→Introduction) |
m (→Introduction) |
||
Line 18: | Line 18: | ||
EIF_BOOLEAN Result = (EIF_BOOLEAN) 0; | EIF_BOOLEAN Result = (EIF_BOOLEAN) 0; | ||
... | ... | ||
− | RTLU (SK_BOOL, &Result); | + | |
+ | /*Load locals onto the debuggers stack (cop_stack):*/ | ||
+ | RTLU (SK_BOOL, &Result); | ||
RTLU(SK_REF,&arg1); | RTLU(SK_REF,&arg1); | ||
RTLU(SK_REF,&arg2); | RTLU(SK_REF,&arg2); | ||
Line 24: | Line 26: | ||
RTLU(SK_INT32, &loc1); | RTLU(SK_INT32, &loc1); | ||
... | ... | ||
− | RTHOOK(1); | + | RTHOOK(1); //Signal debugger, breakpoint slot 1 reached |
loc1 = (EIF_INTEGER_32)((EIF_INTEGER_32) 10L); | loc1 = (EIF_INTEGER_32)((EIF_INTEGER_32) 10L); | ||
− | RTHOOK(2); | + | RTHOOK(2); //Signal debugger, breakpoint slot 2 reached |
tp1 = (FUNCTION_CAST(EIF_REFERENCE, (EIF_REFERENCE)) | tp1 = (FUNCTION_CAST(EIF_REFERENCE, (EIF_REFERENCE)) | ||
RTVF(100, 33, "first", arg1))(arg1); | RTVF(100, 33, "first", arg1))(arg1); | ||
− | RTNHOOK(2); | + | RTNHOOK(2); //Signal debugger, nested breakpoint slot |
tp2 = RTCCL(arg2); | tp2 = RTCCL(arg2); | ||
(FUNCTION_CAST(void, (EIF_REFERENCE, EIF_REFERENCE)) | (FUNCTION_CAST(void, (EIF_REFERENCE, EIF_REFERENCE)) | ||
RTVF(100, 39, "force", tp1))(tp1, tp2); | RTVF(100, 39, "force", tp1))(tp1, tp2); | ||
− | RTHOOK(3); | + | RTHOOK(3); //Signal debugger, breakpoint slot 3 reached |
Result = (EIF_BOOLEAN)(EIF_BOOLEAN) 1; | Result = (EIF_BOOLEAN)(EIF_BOOLEAN) 1; | ||
− | RTHOOK(4); | + | RTHOOK(4); //Signal debugger, breakpoint slot 4 reached |
− | RTLO(5); | + | RTLO(5); //Pop the five locals from the debuggers stack |
return Result; | return Result; |
Revision as of 05:21, 20 January 2007
Warning: Warning: Article under development
Introduction
/* foo */ EIF_BOOLEAN Fadkw7f (EIF_REFERENCE Current, EIF_REFERENCE arg1, EIF_REFERENCE arg2) { EIF_INTEGER_32 loc1 = (EIF_INTEGER_32) 0; EIF_BOOLEAN Result = (EIF_BOOLEAN) 0; ... /*Load locals onto the debuggers stack (cop_stack):*/ RTLU (SK_BOOL, &Result); RTLU(SK_REF,&arg1); RTLU(SK_REF,&arg2); RTLU (SK_REF, &Current); RTLU(SK_INT32, &loc1); ... RTHOOK(1); //Signal debugger, breakpoint slot 1 reached loc1 = (EIF_INTEGER_32)((EIF_INTEGER_32) 10L); RTHOOK(2); //Signal debugger, breakpoint slot 2 reached tp1 = (FUNCTION_CAST(EIF_REFERENCE, (EIF_REFERENCE)) RTVF(100, 33, "first", arg1))(arg1); RTNHOOK(2); //Signal debugger, nested breakpoint slot tp2 = RTCCL(arg2); (FUNCTION_CAST(void, (EIF_REFERENCE, EIF_REFERENCE)) RTVF(100, 39, "force", tp1))(tp1, tp2); RTHOOK(3); //Signal debugger, breakpoint slot 3 reached Result = (EIF_BOOLEAN)(EIF_BOOLEAN) 1; RTHOOK(4); //Signal debugger, breakpoint slot 4 reached RTLO(5); //Pop the five locals from the debuggers stack return Result; } |