mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-16 03:42:35 +03:00
fixing bugs in debug.inc from diamond
git-svn-id: svn://kolibrios.org@44 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
67ea388bb8
commit
c1dd532cde
@ -236,7 +236,7 @@ debug_read_process_memory:
|
|||||||
; ecx=length
|
; ecx=length
|
||||||
; esi->buffer in debugger
|
; esi->buffer in debugger
|
||||||
; edx=address in debuggee
|
; edx=address in debuggee
|
||||||
; out: [esp+36]=eax=sizeof(read)
|
; out: [esp+36]=sizeof(read)
|
||||||
; destroys all
|
; destroys all
|
||||||
add esi, std_application_base_address
|
add esi, std_application_base_address
|
||||||
push ebx
|
push ebx
|
||||||
@ -244,14 +244,17 @@ debug_read_process_memory:
|
|||||||
call check_region
|
call check_region
|
||||||
pop ebx
|
pop ebx
|
||||||
dec eax
|
dec eax
|
||||||
jnz .ret
|
jnz .err
|
||||||
call get_debuggee_slot
|
call get_debuggee_slot
|
||||||
jc .stiret
|
jc .err
|
||||||
|
shr eax, 5
|
||||||
mov ebx, esi
|
mov ebx, esi
|
||||||
call read_process_memory
|
call read_process_memory
|
||||||
.stiret:
|
|
||||||
sti
|
sti
|
||||||
.ret:
|
mov dword [esp+36], eax
|
||||||
|
ret
|
||||||
|
.err:
|
||||||
|
or dword [esp+36], -1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
debug_write_process_memory:
|
debug_write_process_memory:
|
||||||
@ -260,7 +263,7 @@ debug_write_process_memory:
|
|||||||
; ecx=length
|
; ecx=length
|
||||||
; esi->buffer in debugger
|
; esi->buffer in debugger
|
||||||
; edx=address in debuggee
|
; edx=address in debuggee
|
||||||
; out: [esp+36]=eax=sizeof(write)
|
; out: [esp+36]=sizeof(write)
|
||||||
; destroys all
|
; destroys all
|
||||||
add esi, std_application_base_address
|
add esi, std_application_base_address
|
||||||
push ebx
|
push ebx
|
||||||
@ -268,14 +271,14 @@ debug_write_process_memory:
|
|||||||
call check_region
|
call check_region
|
||||||
pop ebx
|
pop ebx
|
||||||
dec eax
|
dec eax
|
||||||
jnz .ret
|
jnz debug_read_process_memory.err
|
||||||
call get_debuggee_slot
|
call get_debuggee_slot
|
||||||
jc .stiret
|
jc debug_read_process_memory.err
|
||||||
|
shr eax, 5
|
||||||
mov ebx, esi
|
mov ebx, esi
|
||||||
call write_process_memory
|
call write_process_memory
|
||||||
.stiret:
|
|
||||||
sti
|
sti
|
||||||
.ret:
|
mov [esp+36], eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
debugger_notify:
|
debugger_notify:
|
||||||
|
Loading…
Reference in New Issue
Block a user