Rev 5461 | Rev 7675 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5461 | Rev 6344 | ||
---|---|---|---|
Line 111... | Line 111... | ||
111 | get_context: |
111 | get_context: |
112 | mcall 69, 1, [debuggee_pid], ctx_end-context, context |
112 | mcall 69, 1, [debuggee_pid], ctx_end-context, context |
113 | ret |
113 | ret |
Line 114... | Line 114... | ||
114 | 114 | ||
115 | set_context: |
- | |
116 | ;push 2 |
- | |
117 | ;pop ebx |
- | |
118 | ;push 69 |
- | |
119 | ;pop eax |
- | |
120 | ;mov ecx, [debuggee_pid] |
- | |
121 | ;mov esi, context |
- | |
122 | ;push 28h |
- | |
123 | ;pop edx |
115 | set_context: |
124 | mcall 69, 2, [debuggee_pid], 28h, context |
116 | mcall 69, 2, [debuggee_pid], 28h, context |
Line 125... | Line 117... | ||
125 | ret |
117 | ret |
126 | 118 | ||
Line 131... | Line 123... | ||
131 | mov ecx, edx |
123 | mov ecx, edx |
132 | xor eax, eax |
124 | xor eax, eax |
133 | push edi |
125 | push edi |
134 | rep stosb |
126 | rep stosb |
135 | pop edi |
127 | pop edi |
136 | ;mov ecx, [debuggee_pid] |
- | |
137 | ;mov al, 69 |
- | |
138 | ;push 6 |
- | |
139 | ;pop ebx |
- | |
140 | mcall 69, 6, [debuggee_pid] |
128 | mcall 69, 6, [debuggee_pid] |
141 | cmp eax, -1 |
129 | cmp eax, -1 |
142 | jnz @f |
130 | jnz @f |
143 | mov esi, read_mem_err |
131 | mov esi, read_mem_err |
144 | call put_message |
132 | call put_message |
Line 246... | Line 234... | ||
246 | jmp draw_messages |
234 | jmp draw_messages |
Line 247... | Line 235... | ||
247 | 235 | ||
248 | .load_ok: |
236 | .load_ok: |
249 | mov [debuggee_pid], eax |
237 | mov [debuggee_pid], eax |
- | 238 | mov [bSuspended], 1 |
|
- | 239 | mov eax, 5 |
|
- | 240 | mov ebx, 20 |
|
- | 241 | int 0x40 |
|
250 | mov [bSuspended], 1 |
242 | |
251 | push ecx |
243 | push ecx |
252 | call get_context |
244 | call get_context |
253 | mov edi, oldcontext |
245 | mov edi, oldcontext |
254 | mov ecx, (ctx_end-context)/4 |
246 | mov ecx, (ctx_end-context)/4 |
Line 714... | Line 706... | ||
714 | add esi, 4 |
706 | add esi, 4 |
715 | dec eax |
707 | dec eax |
716 | jz exception |
708 | jz exception |
717 | dec eax |
709 | dec eax |
718 | jz terminated |
710 | jz terminated |
- | 711 | dec eax |
|
- | 712 | jnz dbg_notify |
|
- | 713 | ||
719 | mov [bSuspended], 1 |
714 | mov [bSuspended], 1 |
720 | cmp [bAfterGo], 0 |
715 | cmp [bAfterGo], 0 |
721 | jnz after_go_exception |
716 | jnz after_go_exception |
722 | push esi |
717 | push esi |
723 | call get_new_context |
718 | call get_new_context |
Line 751... | Line 746... | ||
751 | cmp cl, 4 |
746 | cmp cl, 4 |
752 | jb .6 |
747 | jb .6 |
753 | push esi |
748 | push esi |
754 | jmp exception.done_draw |
749 | jmp exception.done_draw |
Line -... | Line 750... | ||
- | 750 | ||
- | 751 | dbg_notify: |
|
- | 752 | int3 |
|
- | 753 | add esi, 32 |
|
- | 754 | push esi |
|
- | 755 | jmp dbgmsgend |
|
- | 756 | ||
755 | 757 | ||
756 | ; TODO: make it local |
758 | ; TODO: make it local |
757 | terminated: |
759 | terminated: |
758 | push esi |
760 | push esi |
759 | mov esi, terminated_msg |
761 | mov esi, terminated_msg |