new logging system
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@987
This commit is contained in:
parent
a336b5d7cc
commit
c9b747adc4
15 changed files with 45 additions and 33 deletions
|
@ -53,6 +53,8 @@ char* AnalyzeInstruction(char* inst, bool saveSelector);
|
|||
void SaveMemory(Bit16u seg, Bit16u ofs1, Bit32s num);
|
||||
class DEBUG;
|
||||
|
||||
extern void DEBUG_ShowMsg(Bit32u entry, char* format, ...);
|
||||
|
||||
DEBUG* pDebugcom = 0;
|
||||
bool exitLoop = false;
|
||||
bool logHeavy = false;
|
||||
|
|
|
@ -44,6 +44,9 @@ namespace {
|
|||
};
|
||||
|
||||
extern int old_cursor_state;
|
||||
|
||||
|
||||
|
||||
void DEBUG_ShowMsg(Bit32u entry, char * format,...) {
|
||||
|
||||
if (!(entry & LOG_ERROR) && entry && !loggrp[entry].enabled) return;
|
||||
|
@ -58,7 +61,14 @@ void DEBUG_ShowMsg(Bit32u entry, char * format,...) {
|
|||
wrefresh(dbg.win_out);
|
||||
if(debuglog) fprintf(debuglog,"%10d: %s\n",cycle_count,buf);
|
||||
}
|
||||
|
||||
void LOG::operator() (char* format, ...){
|
||||
char buf[1024];
|
||||
va_list msg;
|
||||
va_start(msg,format);
|
||||
vsprintf(buf,format,msg);
|
||||
va_end(msg);
|
||||
DEBUG_ShowMsg(this->d_type|this->d_severity,buf);
|
||||
}
|
||||
|
||||
|
||||
static void Draw_RegisterLayout(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue