Changeset 21717 for branches/gcc-kmk/src/kernel32/dbglog.cpp
- Timestamp:
- Oct 18, 2011, 9:16:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/src/kernel32/dbglog.cpp
r21343 r21717 93 93 /* arguments. */ 94 94 /* ----------------------------------------------------------------- */ 95 int SYSTEM WriteLog(c har *f, ...)95 int SYSTEM WriteLog(const char *f, ...) 96 96 { 97 97 TIB *ptib; /* process/thread id structures */ … … 305 305 } 306 306 307 int SYSTEM WriteLog(c har *tekst, ...)307 int SYSTEM WriteLog(const char *tekst, ...) 308 308 { 309 309 USHORT sel = RestoreOS2FS(); … … 348 348 sprintf(szLogFile, "%s%d.log", pszLogBase, loadNr); 349 349 flog = fopen(szLogFile, "w"); 350 if(flog == NULL) 350 if(flog == NULL) 351 351 {//probably running exe on readonly device 352 352 sprintf(szLogFile, "%sodin32_%d.log", kernel32Path, loadNr); … … 385 385 if(logSocket == -1) { 386 386 #endif 387 if(teb) 387 if(teb) 388 388 { 389 389 ULONG ulCallDepth; … … 393 393 ulCallDepth = 0; 394 394 #endif 395 395 396 396 teb->o.odin.logfile = (DWORD)flog; 397 397 398 398 #ifdef LOG_TIME 399 399 if(sel == 0x150b && fSwitchTIBSel) 400 fprintf(flog, 400 fprintf(flog, 401 401 "t%02d (%3d): (%x) (FS=150B) ", 402 402 LOWORD(teb->o.odin.threadId), 403 403 ulCallDepth, 404 404 GetTickCount()); 405 else 406 fprintf(flog, 405 else 406 fprintf(flog, 407 407 "t%02d (%3d): (%x) ", 408 408 LOWORD(teb->o.odin.threadId), … … 410 410 GetTickCount()); 411 411 #else 412 if(sel == 0x150b && fSwitchTIBSel) 413 fprintf(flog, 412 if(sel == 0x150b && fSwitchTIBSel) 413 fprintf(flog, 414 414 #ifdef SHOW_FPU_CONTROLREG 415 415 "t%02d (%3d)(%3x): ", … … 422 422 ulCallDepth); 423 423 #endif 424 else 425 fprintf(flog, 424 else 425 fprintf(flog, 426 426 #ifdef SHOW_FPU_CONTROLREG 427 427 "t%02d (%3d)(%3x): ", … … 450 450 int prefixlen = 0; 451 451 452 if(teb) 452 if(teb) 453 453 { 454 454 ULONG ulCallDepth; … … 459 459 #endif 460 460 #ifdef LOG_TIME 461 if(sel == 0x150b && fSwitchTIBSel) 461 if(sel == 0x150b && fSwitchTIBSel) 462 462 sprintf(logbuffer, "t%02d (%3d): %x (FS=150B) ", 463 463 LOWORD(teb->o.odin.threadId), ulCallDepth, GetTickCount()); 464 else 464 else 465 465 sprintf(logbuffer, "t%02d (%3d): %x ", 466 466 LOWORD(teb->o.odin.threadId), ulCallDepth, GetTickCount()); 467 467 #else 468 if(sel == 0x150b && fSwitchTIBSel) 468 if(sel == 0x150b && fSwitchTIBSel) 469 469 sprintf(logbuffer, "t%02d (%3d): (FS=150B) ", 470 470 LOWORD(teb->o.odin.threadId), ulCallDepth); 471 else 471 else 472 472 sprintf(logbuffer, "t%02d (%3d): ", 473 473 LOWORD(teb->o.odin.threadId), ulCallDepth); … … 497 497 if(tekst[strlen(tekst)-1] != '\n') 498 498 fprintf(flog, "\n"); 499 #if 0 499 #if 0 500 500 if (teb && LOWORD(teb->o.odin.threadId) > 1) 501 501 { … … 514 514 break; 515 515 } 516 516 517 517 if ((ULONG)pframe < getESP()) 518 518 { … … 554 554 //****************************************************************************** 555 555 //****************************************************************************** 556 int SYSTEM WriteLogNoEOL(c har *tekst, ...)556 int SYSTEM WriteLogNoEOL(const char *tekst, ...) 557 557 { 558 558 USHORT sel = RestoreOS2FS(); … … 612 612 //****************************************************************************** 613 613 //****************************************************************************** 614 int SYSTEM WritePrivateLog(void *logfile, c har *tekst, ...)614 int SYSTEM WritePrivateLog(void *logfile, const char *tekst, ...) 615 615 { 616 616 USHORT sel = RestoreOS2FS();
Note:
See TracChangeset
for help on using the changeset viewer.