Add DEBUGFG macro: log groups

git-svn-id: svn://kolibrios.org@6818 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2016-12-28 02:03:37 +00:00
parent a7cb2f3691
commit 88ca371b1a
2 changed files with 52 additions and 0 deletions

View File

@ -372,6 +372,17 @@ macro DEBUGF _level,_format,[_arg] {
end if
}
macro DEBUGFG _level, _group, _format, [_arg] {
common
if _group eqtype
DEBUGF _level, _format,_arg
else
if _level >= _group
DEBUGF 999, _format,_arg
end if
end if
}
macro __include_debug_strings dummy,[_id,_fmt,_len] {
common
local c1,a1,a2

View File

@ -0,0 +1,41 @@
use32
org 0x0
db 'MENUET01'
dd 0x01,start,i_end,e_end,e_end,0,0
__DEBUG__ = 1
__DEBUG_LEVEL__ = 2
LOG_FLOW equ 1
LOG_CALC equ 3
LOG_SEND equ
include '../../../macros.inc'
include '../../../debug-fdo.inc'
start:
DEBUGFG 1, LOG_FLOW, '1 flow\n'
DEBUGFG 2, LOG_FLOW, '2 flow\n'
DEBUGFG 3, LOG_FLOW, '3 flow\n'
DEBUGFG 1, LOG_CALC, '1 calc\n'
DEBUGFG 2, LOG_CALC, '2 calc\n'
DEBUGFG 3, LOG_CALC, '3 calc\n'
DEBUGFG 1, LOG_SEND, '1 send\n'
DEBUGFG 2, LOG_SEND, '2 send\n'
DEBUGFG 3, LOG_SEND, '3 send\n'
DEBUGF 1, '1 blah\n'
DEBUGF 2, '2 blah\n'
DEBUGF 3, '3 blah\n'
mov eax, -1
int 0x40
include_debug_strings
i_end:
rb 0x100 ;stack
e_end: