Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
131 diamond 1
; Include file for dumping user apps' memory through new debug BOARD
2
 
3
; Max amount of bytes to be dumped
4
IPC_BUF equ 160
5
 
6
; Dump macro parameters:
7
;     ptr - pointer to memory dumped
8
;     len - dump length
9
;     workarea - any work area for sysfunc 9
10
;     run_new  - if not empty, run BOARD unless it is running already
11
 
12
macro Dump ptr, len, workarea,run_new
13
{
14
  local .exist,.lt
15
  pusha
16
  mov  ebx,workarea
17
  call Board_seek
18
if ~ run_new eq
19
  test edx,edx
20
  jne .exist
21
  mcall 19,Board_seek.board_fn,0
22
  mov  edx,eax
23
  mcall 5,20
24
end if
25
 .exist:
26
  mov  esi,len
27
  cmp  esi,IPC_BUF
28
  jbe  .lt
29
  mov  esi,IPC_BUF
30
 .lt:
31
  mcall 60,2,edx,ptr
32
  popa
33
}
34
 
35
if used Board_seek
36
Board_seek:
37
; ebx - prcinfo
38
  xor  edx,edx
39
  mcall 9,,-1
40
  mov  ecx,eax
41
  mov  esi,dword[.board_fn]
42
.lp:
43
  mcall 9
44
  cmp  dword[ebx+10],esi
45
;  jne  .no
46
;  cmp  dword[ebx+42],399
47
  je   .ok
48
.no:
49
  loop .lp
50
  ret
51
.ok:
52
  mov  edx,[ebx+30]
53
  ret
54
.board_fn db 'BOARD      '
55
end if