Subversion Repositories Kolibri OS

Rev

Rev 40 | Rev 63 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 40 Rev 44
Line 234... Line 234...
234
; in:
234
; in:
235
; ebx=pid
235
; ebx=pid
236
; ecx=length
236
; ecx=length
237
; esi->buffer in debugger
237
; esi->buffer in debugger
238
; edx=address in debuggee
238
; edx=address in debuggee
239
; out: [esp+36]=eax=sizeof(read)
239
; out: [esp+36]=sizeof(read)
240
; destroys all
240
; destroys all
241
	add	esi, std_application_base_address
241
	add	esi, std_application_base_address
242
	push	ebx
242
	push	ebx
243
	mov	ebx, esi
243
	mov	ebx, esi
244
	call	check_region
244
	call	check_region
245
	pop	ebx
245
	pop	ebx
246
	dec	eax
246
	dec	eax
247
	jnz	.ret
247
	jnz	.err
248
	call	get_debuggee_slot
248
	call	get_debuggee_slot
249
	jc	.stiret
249
	jc	.err
-
 
250
	shr	eax, 5
250
	mov	ebx, esi
251
	mov	ebx, esi
251
	call	read_process_memory
252
	call	read_process_memory
252
.stiret:
-
 
253
	sti
253
	sti
-
 
254
	mov	dword [esp+36], eax
254
.ret:
255
	ret
-
 
256
.err:
-
 
257
	or	dword [esp+36], -1
255
	ret
258
	ret
Line 256... Line 259...
256
 
259
 
257
debug_write_process_memory:
260
debug_write_process_memory:
258
; in:
261
; in:
259
; ebx=pid
262
; ebx=pid
260
; ecx=length
263
; ecx=length
261
; esi->buffer in debugger
264
; esi->buffer in debugger
262
; edx=address in debuggee
265
; edx=address in debuggee
263
; out: [esp+36]=eax=sizeof(write)
266
; out: [esp+36]=sizeof(write)
264
; destroys all
267
; destroys all
265
	add	esi, std_application_base_address
268
	add	esi, std_application_base_address
266
	push	ebx
269
	push	ebx
267
	mov	ebx, esi
270
	mov	ebx, esi
268
	call	check_region
271
	call	check_region
269
	pop	ebx
272
	pop	ebx
270
	dec	eax
273
	dec	eax
271
	jnz	.ret
274
	jnz	debug_read_process_memory.err
-
 
275
	call	get_debuggee_slot
272
	call	get_debuggee_slot
276
	jc	debug_read_process_memory.err
273
	jc	.stiret
277
	shr	eax, 5
274
	mov	ebx, esi
278
	mov	ebx, esi
275
	call	write_process_memory
-
 
276
.stiret:
279
	call	write_process_memory
277
	sti
280
	sti
278
.ret:
281
	mov	[esp+36], eax
Line 279... Line 282...
279
	ret
282
	ret
280
 
283
 
281
debugger_notify:
284
debugger_notify: