| 1 | ;
|
|---|
| 2 | ; NDEBUG.ASM -- No debugger
|
|---|
| 3 | ;
|
|---|
| 4 | ; Copyright (c) 1991-1995 by Eberhard Mattes
|
|---|
| 5 | ;
|
|---|
| 6 | ; This file is part of emx.
|
|---|
| 7 | ;
|
|---|
| 8 | ; emx is free software; you can redistribute it and/or modify it
|
|---|
| 9 | ; under the terms of the GNU General Public License as published by
|
|---|
| 10 | ; the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 11 | ; any later version.
|
|---|
| 12 | ;
|
|---|
| 13 | ; emx is distributed in the hope that it will be useful,
|
|---|
| 14 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 15 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 16 | ; GNU General Public License for more details.
|
|---|
| 17 | ;
|
|---|
| 18 | ; You should have received a copy of the GNU General Public License
|
|---|
| 19 | ; along with emx; see the file COPYING. If not, write to
|
|---|
| 20 | ; the Free Software Foundation, 59 Temple Place - Suite 330,
|
|---|
| 21 | ; Boston, MA 02111-1307, USA.
|
|---|
| 22 | ;
|
|---|
| 23 | ; See emx.asm for a special exception.
|
|---|
| 24 | ;
|
|---|
| 25 |
|
|---|
| 26 | INCLUDE EMX.INC
|
|---|
| 27 | INCLUDE PMINT.INC
|
|---|
| 28 |
|
|---|
| 29 | PUBLIC STEP_FLAG, DEBUG_AVAIL, DEBUG_SER_FLAG, DEBUG_SER_PORT
|
|---|
| 30 | PUBLIC DEBUG_EXCEPTION, SET_BREAKPOINT, INS_BREAKPOINTS
|
|---|
| 31 | PUBLIC DEBUG_RESUME, DEBUG_STEP, DEBUG_QUIT, DEBUG_INIT
|
|---|
| 32 |
|
|---|
| 33 | SV_DATA SEGMENT
|
|---|
| 34 |
|
|---|
| 35 | STEP_FLAG DB FALSE
|
|---|
| 36 | DEBUG_AVAIL DB FALSE
|
|---|
| 37 | DEBUG_SER_FLAG DB FALSE
|
|---|
| 38 | DEBUG_SER_PORT DW 0
|
|---|
| 39 |
|
|---|
| 40 | SV_DATA ENDS
|
|---|
| 41 |
|
|---|
| 42 | SV_CODE SEGMENT
|
|---|
| 43 |
|
|---|
| 44 | ASSUME CS:SV_CODE, DS:NOTHING
|
|---|
| 45 |
|
|---|
| 46 | ;
|
|---|
| 47 | ; Set EFLAGS for resuming current process (without stepping)
|
|---|
| 48 | ;
|
|---|
| 49 | ; In: SS:BP Interrupt/exception stack frame
|
|---|
| 50 | ;
|
|---|
| 51 | ASSUME BP:PTR ISTACKFRAME
|
|---|
| 52 | DEBUG_RESUME PROC NEAR
|
|---|
| 53 | AND I_EFLAGS, NOT FLAG_TF
|
|---|
| 54 | OR I_EFLAGS, FLAG_RF
|
|---|
| 55 | RET
|
|---|
| 56 | ASSUME BP:NOTHING
|
|---|
| 57 | DEBUG_RESUME ENDP
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 | ;
|
|---|
| 61 | ; Set EFLAGS for single stepping current process
|
|---|
| 62 | ;
|
|---|
| 63 | ; In: SS:BP Interrupt/exception stack frame
|
|---|
| 64 | ;
|
|---|
| 65 | ASSUME BP:PTR ISTACKFRAME
|
|---|
| 66 | DEBUG_STEP PROC NEAR
|
|---|
| 67 | OR I_EFLAGS, FLAG_TF
|
|---|
| 68 | RET
|
|---|
| 69 | ASSUME BP:NOTHING
|
|---|
| 70 | DEBUG_STEP ENDP
|
|---|
| 71 |
|
|---|
| 72 | DEBUG_EXCEPTION PROC NEAR
|
|---|
| 73 | RET ; Return and dump registers
|
|---|
| 74 | DEBUG_EXCEPTION ENDP
|
|---|
| 75 |
|
|---|
| 76 | SET_BREAKPOINT PROC NEAR
|
|---|
| 77 | RET
|
|---|
| 78 | SET_BREAKPOINT ENDP
|
|---|
| 79 |
|
|---|
| 80 | INS_BREAKPOINTS PROC NEAR
|
|---|
| 81 | RET
|
|---|
| 82 | INS_BREAKPOINTS ENDP
|
|---|
| 83 |
|
|---|
| 84 | DEBUG_INIT PROC NEAR
|
|---|
| 85 | RET
|
|---|
| 86 | DEBUG_INIT ENDP
|
|---|
| 87 |
|
|---|
| 88 | DEBUG_QUIT PROC NEAR
|
|---|
| 89 | RET
|
|---|
| 90 | DEBUG_QUIT ENDP
|
|---|
| 91 |
|
|---|
| 92 | SV_CODE ENDS
|
|---|
| 93 |
|
|---|
| 94 | END
|
|---|