Changeset 7602 in vbox
- Timestamp:
- Mar 27, 2008 5:25:37 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 29102
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r7571 r7602 2685 2685 TEMPLATE_VBOXGUESTR3EXE_BLD_TRG_ARCH = x86 2686 2686 TEMPLATE_VBOXGUESTR3EXE_BLD_TRG_CPU = blend 2687 TEMPLATE_VBOXGUESTR3EXE_DEFS := IN_GUEST IN_GUEST_R3 IN_RT_R3 LOG_TO_BACKDOOR_FULL \ 2688 $(filter-out $(ARCH_BITS_DEFS),$(TEMPLATE_VBOXR3EXE_DEFS)) HC_ARCH_BITS=32 GC_ARCH_BITS=32 2687 TEMPLATE_VBOXGUESTR3EXE_DEFS := IN_GUEST IN_GUEST_R3 IN_RT_R3 \ 2688 $(filter-out $(ARCH_BITS_DEFS),$(TEMPLATE_VBOXR3EXE_DEFS)) \ 2689 HC_ARCH_BITS=32 GC_ARCH_BITS=32 2689 2690 if1of ($(BUILD_TARGET),l4 linux) # As few libs as possible on linux. 2690 2691 TEMPLATE_VBOXGUESTR3EXE_LIBS = pthread rt m … … 2745 2746 TEMPLATE_VBOXGUESTR3XF86MOD_LIBS = \ 2746 2747 $(VBOX_LIB_VBGL_R3_XFREE86) 2748 TEMPLATE_VBOXGUESTR3XF86MOD_DEFS = $(TEMPLATE_VBOXGUESTR3DLL_DEFS) LOG_TO_BACKDOOR 2747 2749 2748 2750 … … 2757 2759 TEMPLATE_VBOXGUESTR3XORGMOD_LIBS.linux = $(NO_SUCH_VARIABLE) 2758 2760 TEMPLATE_VBOXGUESTR3XORGMOD_CFLAGS = $(TEMPLATE_VBOXGUESTR3DLL_CFLAGS) -std=c99 2761 TEMPLATE_VBOXGUESTR3XORGMOD_DEFS = $(TEMPLATE_VBOXGUESTR3DLL_DEFS) LOG_TO_BACKDOOR 2759 2762 if1of ($(BUILD_TARGET), linux l4) 2760 2763 TEMPLATE_VBOXGUESTR3XORGMOD_LDFLAGS = $(TEMPLATE_VBOXGUESTR3DLL_LDFLAGS) -s -
trunk/include/iprt/log.h
r7448 r7602 400 400 #endif 401 401 402 /*403 * If we are doing full backdoor logging disable the weaker form404 */405 #if defined(LOG_TO_BACKDOOR_FULL)406 # undef LOG_TO_BACKDOOR407 #endif408 402 409 403 /** @def LogIt … … 411 405 */ 412 406 #ifdef LOG_ENABLED 413 # if !defined(LOG_TO_BACKDOOR_FULL) || defined(LOG_NO_BACKDOOR) 414 # if defined(RT_ARCH_AMD64) || defined(LOG_USE_C99) 415 # define _LogRemoveParentheseis(...) __VA_ARGS__ 416 # define _LogIt(pvInst, fFlags, iGroup, ...) RTLogLoggerEx((PRTLOGGER)pvInst, fFlags, iGroup, __VA_ARGS__) 417 # define LogIt(pvInst, fFlags, iGroup, fmtargs) _LogIt(pvInst, fFlags, iGroup, _LogRemoveParentheseis fmtargs) 418 # else 419 # define LogIt(pvInst, fFlags, iGroup, fmtargs) \ 407 # if defined(RT_ARCH_AMD64) || defined(LOG_USE_C99) 408 # define _LogRemoveParentheseis(...) __VA_ARGS__ 409 # define _LogIt(pvInst, fFlags, iGroup, ...) RTLogLoggerEx((PRTLOGGER)pvInst, fFlags, iGroup, __VA_ARGS__) 410 # define LogIt(pvInst, fFlags, iGroup, fmtargs) _LogIt(pvInst, fFlags, iGroup, _LogRemoveParentheseis fmtargs) 411 # else 412 # define LogIt(pvInst, fFlags, iGroup, fmtargs) \ 420 413 do \ 421 414 { \ … … 428 421 } \ 429 422 } while (0) 430 # endif 431 # else /* LOG_TO_BACKDOOR_FULL defined */ 432 # define LogIt(pvInst, fFlags, iGroup, fmtargs) \ 433 do \ 434 { \ 435 register PRTLOGGER LogIt_pLogger = (PRTLOGGER)(pvInst) ? (PRTLOGGER)(pvInst) : RTLogDefaultInstance(); \ 436 if (LogIt_pLogger) \ 437 { \ 438 register unsigned LogIt_fFlags = LogIt_pLogger->afGroups[(unsigned)(iGroup) < LogIt_pLogger->cGroups ? (unsigned)(iGroup) : 0]; \ 439 if ((LogIt_fFlags & ((fFlags) | RTLOGGRPFLAGS_ENABLED)) == ((fFlags) | RTLOGGRPFLAGS_ENABLED)) \ 440 RTLogBackdoorPrintf fmtargs; \ 441 } \ 442 } while (0) 443 # endif /* LOG_TO_BACKDOOR_FULL defined */ 423 # endif 444 424 #else 445 425 # define LogIt(pvInst, fFlags, iGroup, fmtargs) do { } while (0) … … 728 708 * Write to specific logger if group enabled. 729 709 */ 730 #if !defined(LOG_TO_BACKDOOR_FULL) || defined(LOG_NO_BACKDOOR) 731 # if defined(RT_ARCH_AMD64) || defined(LOG_USE_C99) 732 # define _LogRelRemoveParentheseis(...) __VA_ARGS__ 733 # define _LogRelIt(pvInst, fFlags, iGroup, ...) RTLogLoggerEx((PRTLOGGER)pvInst, fFlags, iGroup, __VA_ARGS__) 734 # define LogRelIt(pvInst, fFlags, iGroup, fmtargs) \ 710 #if defined(RT_ARCH_AMD64) || defined(LOG_USE_C99) 711 # define _LogRelRemoveParentheseis(...) __VA_ARGS__ 712 # define _LogRelIt(pvInst, fFlags, iGroup, ...) RTLogLoggerEx((PRTLOGGER)pvInst, fFlags, iGroup, __VA_ARGS__) 713 # define LogRelIt(pvInst, fFlags, iGroup, fmtargs) \ 735 714 do \ 736 715 { \ … … 740 719 LogIt(LOG_INSTANCE, fFlags, iGroup, fmtargs); \ 741 720 } while (0) 742 # 743 # 721 #else 722 # define LogRelIt(pvInst, fFlags, iGroup, fmtargs) \ 744 723 do \ 745 724 { \ … … 753 732 LogIt(LOG_INSTANCE, fFlags, iGroup, fmtargs); \ 754 733 } while (0) 755 # endif 756 #else /* LOG_TO_BACKDOOR_FULL defined and LOG_NO_BACKDOOR not defined */ 757 # define LogRelIt(pvInst, fFlags, iGroup, fmtargs) \ 758 do { \ 759 RTLogBackdoorPrintf fmtargs; \ 760 } while (0) 761 #endif /* LOG_TO_BACKDOOR_FULL defined and LOG_NO_BACKDOOR not defined */ 734 #endif 762 735 763 736 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
r7539 r7602 38 38 #include <iprt/thread.h> 39 39 #include <VBox/VBoxGuest.h> 40 #include <VBox/log.h> 40 41 #include "VBGLR3Internal.h" 41 42 … … 162 163 #endif 163 164 165 /* Create release logger */ 166 PRTLOGGER loggerRelease; 167 static const char * const s_apszGroups[] = VBOX_LOGGROUP_NAMES; 168 int rrc = RTLogCreate(&loggerRelease, 0, NULL, "VBOXGUEST_RELEASE_LOG", 169 RT_ELEMENTS(s_apszGroups), &s_apszGroups[0], 170 RTLOGDEST_USER, "VBox.log"); 171 /* This may legitimately fail if we are using the mini-runtime. */ 172 if (RT_SUCCESS(rrc)) 173 RTLogRelSetDefaultInstance(loggerRelease); 174 164 175 return VINF_SUCCESS; 165 176 } -
trunk/src/VBox/Runtime/VBox/log-vbox.cpp
r7169 r7602 284 284 PRTLOGGER pLogger; 285 285 #ifdef IN_RING3 286 # ifndef LOG_TO_BACKDOOR286 # ifndef IN_GUEST_R3 287 287 char szExecName[RTPATH_MAX]; 288 288 if (!RTProcGetExecutableName(szExecName, sizeof(szExecName))) … … 369 369 } 370 370 371 # else /* LOG_TO_BACKDOOR*/371 # else /* IN_GUEST_R3 */ 372 372 /* The user destination is backdoor logging. */ 373 373 int rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG", 374 374 RT_ELEMENTS(g_apszGroups), &g_apszGroups[0], 375 375 RTLOGDEST_USER, "VBox.log"); 376 # endif /* LOG_TO_BACKDOOR*/376 # endif /* IN_GUEST_R3 */ 377 377 378 378 #else /* IN_RING0 */ 379 379 int rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0], 380 # ifdef LOG_TO_BACKDOOR 380 # ifdef LOG_TO_BACKDOOR /** @todo look at guest ring 0 logging */ 381 381 RTLOGDEST_USER, 382 382 # else -
trunk/src/VBox/Runtime/VBox/logbackdoor-redirect.cpp
r6551 r7602 31 31 *******************************************************************************/ 32 32 #include <VBox/log.h> 33 #include <VBox/err.h> 33 34 34 35 … … 47 48 } 48 49 50 /* All logging goes to the backdoor logger anyway. */ 51 RTDECL(PRTLOGGER) RTLogRelSetDefaultInstance(PRTLOGGER pLogger) 52 { 53 return NULL; 54 } 49 55 50 56 RTDECL(void) RTLogRelPrintf(const char *pszFormat, ...) … … 85 91 } 86 92 93 /* Do nothing. */ 94 RTDECL(int) RTLogCreate(PRTLOGGER *ppLogger, RTUINT fFlags, const char *pszGroupSettings, 95 const char *pszEnvVarBase, unsigned cGroups, const char * const * papszGroups, 96 RTUINT fDestFlags, const char *pszFilenameFmt, ...) 97 { 98 return VERR_NOT_IMPLEMENTED; 99 }
Note:
See TracChangeset
for help on using the changeset viewer.