Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4443 → Rev 4442

/programs/develop/mtdbg/mtdbg.asm
882,30 → 882,24
; Step execution event
 
;Here we get [<number>] argument at do step <number> times
OnStepMultiple:
OnStep:
cmp [bSuspended], 0
jz OnStep.running
mov [step_num], 1
jz .running
cmp [step_num], 0
jg .stepone
mov esi, [curarg]
test esi, esi
jz .do
cmp esi, 0
jz .stepone
cmp byte [esi], 0
jz .do
jz .stepone
call get_hex_number
jc .ret
cmp eax, 0 ; check if lesser or equal than 0
jle .ret
mov [step_num], eax
.do:
call OnStep
dec [step_num]
jnz .do
.ret:
ret
mov [curarg], 0
 
OnStep:
cmp [bSuspended], 0
jz .running
.stepone:
call get_context
or byte [_eflags+1], 1 ; set TF
call set_context
947,6 → 941,15
mov [bAfterGo], 2
 
@@:
mov eax, [step_num]
dec eax
cmp eax, 0
jle .ret
mov [step_num], eax
jmp .stepone
 
.ret:
mov [step_num], 0
ret
 
; return address is [ebp-4]
1015,7 → 1018,7
 
@@:
call get_byte_nobreak
jc OnStep
jc OnStep.stepone
inc esi
; skip prefixes
call is_prefix
1051,14 → 1054,14
; FF /2 = call
.noloop:
cmp al, 0xFF
jnz OnStep
jnz OnStep.stepone
call get_byte_nobreak
jc OnStep
jc OnStep.stepone
inc esi
mov cl, al
and al, 00111000b
cmp al, 00010000b
jnz OnStep
jnz OnStep.stepone
; skip instruction
mov al, cl
and eax, 7
1082,7 → 1085,7
cmp al, 4
jnz @f
call get_byte_nobreak
jc OnStep
jc OnStep.stepone
inc esi
and al, 7
 
1094,7 → 1097,7
.doit:
; insert one-shot breakpoint at esi and resume
call get_byte_nobreak
jc OnStep
jc OnStep.stepone
mov eax, esi
call find_enabled_breakpoint
jz @f
2398,7 → 2401,7
db 9
dd aResume, OnResume, ResumeSyntax, ResumeHelp
db 0Bh
dd aStep, OnStepMultiple, StepSyntax, StepHelp
dd aStep, OnStep, StepSyntax, StepHelp
db 0Bh
dd aProceed, OnProceed, ProceedSyntax, ProceedHelp
db 0Bh