forked from KolibriOS/kolibrios
fixed debugging broken in rev. 1329
git-svn-id: svn://kolibrios.org@1394 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
8e6ff896c2
commit
cca30001ba
@ -323,7 +323,7 @@ debug_read_process_memory:
|
|||||||
call get_debuggee_slot
|
call get_debuggee_slot
|
||||||
jc .err
|
jc .err
|
||||||
shr eax, 5
|
shr eax, 5
|
||||||
; mov ebx, esi
|
mov ecx, edi
|
||||||
call read_process_memory
|
call read_process_memory
|
||||||
sti
|
sti
|
||||||
mov dword [esp+32], eax
|
mov dword [esp+32], eax
|
||||||
@ -349,7 +349,7 @@ debug_write_process_memory:
|
|||||||
call get_debuggee_slot
|
call get_debuggee_slot
|
||||||
jc debug_read_process_memory.err
|
jc debug_read_process_memory.err
|
||||||
shr eax, 5
|
shr eax, 5
|
||||||
; mov ebx, esi
|
mov ecx, edi
|
||||||
call write_process_memory
|
call write_process_memory
|
||||||
sti
|
sti
|
||||||
mov [esp+32], eax
|
mov [esp+32], eax
|
||||||
@ -368,23 +368,23 @@ debugger_notify:
|
|||||||
.1:
|
.1:
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov edx, [SLOT_BASE+eax+APPDATA.dbg_event_mem]
|
mov esi, [SLOT_BASE+eax+APPDATA.dbg_event_mem]
|
||||||
test edx, edx
|
test esi, esi
|
||||||
jz .ret
|
jz .ret
|
||||||
; read buffer header
|
; read buffer header
|
||||||
push ecx
|
push ecx
|
||||||
push eax
|
push eax
|
||||||
push eax
|
push eax
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
mov ebx, esp
|
mov ecx, esp
|
||||||
mov ecx, 8
|
mov edx, 8
|
||||||
call read_process_memory
|
call read_process_memory
|
||||||
cmp eax, ecx
|
cmp eax, edx
|
||||||
jz @f
|
jz @f
|
||||||
add esp, 12
|
add esp, 12
|
||||||
jmp .ret
|
jmp .ret
|
||||||
@@:
|
@@:
|
||||||
cmp dword [ebx], 0
|
cmp dword [ecx], 0
|
||||||
jg @f
|
jg @f
|
||||||
.2:
|
.2:
|
||||||
pop ecx
|
pop ecx
|
||||||
@ -400,26 +400,26 @@ debugger_notify:
|
|||||||
cli
|
cli
|
||||||
jmp .1
|
jmp .1
|
||||||
@@:
|
@@:
|
||||||
mov ecx, [ebx+8]
|
mov edx, [ecx+8]
|
||||||
add ecx, [ebx+4]
|
add edx, [ecx+4]
|
||||||
cmp ecx, [ebx]
|
cmp edx, [ecx]
|
||||||
ja .2
|
ja .2
|
||||||
; advance buffer position
|
; advance buffer position
|
||||||
push ecx
|
push edx
|
||||||
mov ecx, 4
|
mov edx, 4
|
||||||
sub ebx, ecx
|
sub ecx, edx
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
add edx, ecx
|
add esi, edx
|
||||||
call write_process_memory
|
call write_process_memory
|
||||||
pop eax
|
pop eax
|
||||||
; write message
|
; write message
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
add edx, ecx
|
add esi, edx
|
||||||
add edx, [ebx+8]
|
add esi, [ecx+8]
|
||||||
add ebx, 20
|
add ecx, 20
|
||||||
pop ecx
|
pop edx
|
||||||
pop ecx
|
pop edx
|
||||||
pop ecx
|
pop edx
|
||||||
call write_process_memory
|
call write_process_memory
|
||||||
; new debug event
|
; new debug event
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
|
Loading…
Reference in New Issue
Block a user