Subversion Repositories Kolibri OS

Rev

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

Rev 3555 Rev 3626
Line 9... Line 9...
9
;;  Distributed under GPL. See file COPYING for details.        ;;
9
;;  Distributed under GPL. See file COPYING for details.        ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
11
;;                                                              ;;
11
;;                                                              ;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 13... Line 13...
13
 
13
 
Line 14... Line 14...
14
$Revision: 3555 $
14
$Revision: 3626 $
15
 
15
 
16
align 4 ;3A08
16
align 4 ;3A08
17
build_interrupt_table:
17
build_interrupt_table:
Line 158... Line 158...
158
; not debuggee => say error and terminate
158
; not debuggee => say error and terminate
159
        call    show_error_parameters ;; only ONE using, inline ???
159
        call    show_error_parameters ;; only ONE using, inline ???
160
       ;mov     edx, [TASK_BASE]
160
       ;mov     edx, [TASK_BASE]
161
        mov     [edx + TASKDATA.state], byte 4 ; terminate
161
        mov     [edx + TASKDATA.state], byte 4 ; terminate
162
        call    wakeup_osloop
162
        call    wakeup_osloop
-
 
163
        call    change_task
163
        jmp     change_task     ; stack - here it does not matter at all, SEE: core/shed.inc
164
; If we're here, then the main OS thread has crashed before initializing IDLE thread.
-
 
165
; Or they both have crashed. Anyway, things are hopelessly broken.
-
 
166
        hlt
-
 
167
        jmp     $-1
164
.debug:
168
.debug:
165
; we are debugged process, notify debugger and suspend ourself
169
; we are debugged process, notify debugger and suspend ourself
166
; eax=debugger PID
170
; eax=debugger PID
167
        mov     ecx, 1          ; debug_message code=other_exception
171
        mov     ecx, 1          ; debug_message code=other_exception
168
        cmp     bl, 1           ; #DB
172
        cmp     bl, 1           ; #DB
Line 502... Line 506...
502
        mov     edi, esi
506
        mov     edi, esi
503
        shl     edi, 5
507
        shl     edi, 5
504
        mov     eax, [SLOT_BASE+edi*8+APPDATA.debugger_slot]
508
        mov     eax, [SLOT_BASE+edi*8+APPDATA.debugger_slot]
505
        test    eax, eax
509
        test    eax, eax
506
        jz      .nodebug
510
        jz      .nodebug
507
        push    8
-
 
508
        pop     ecx
511
        movi    ecx, 8
509
        push    dword [CURRENT_TASK+edi+TASKDATA.pid]; PID
512
        push    dword [CURRENT_TASK+edi+TASKDATA.pid]; PID
510
        push    2
513
        push    2
511
        call    debugger_notify
514
        call    debugger_notify
512
        pop     ecx
515
        pop     ecx
513
        pop     ecx
516
        pop     ecx