VirtualBox

Changeset 6493 in vbox


Ignore:
Timestamp:
Jan 24, 2008 6:37:10 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27499
Message:

Made it possible to make debug versions of vboxdrv on linux. This will check for BUILD_TYPE=debug, so for those who doesn't want ring-0 assertions in vboxdrv make sure you built it with BUILD_TYPE <> debug.

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/linux/Makefile

    r6159 r6493  
    2727
    2828#
    29 # First, figure out which architecture we're targeting.
     29# First, figure out which architecture we're targeting and the build type.
    3030# (We have to support basic cross building (ARCH=i386|x86_64).)
     31# While at it, warn about BUILD_* vars found to help with user problems.
    3132#
    3233ifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
     
    4849  endif
    4950 endif
     51else
     52 $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
     53endif
     54
     55ifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
     56 $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
     57 BUILD_TYPE :=
     58endif
     59ifeq ($(BUILD_TYPE),)
     60 BUILD_TYPE := release
     61else
     62 $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
    5063endif
    5164
     
    6881OBJS  += alloc/heapsimple.o
    6982endif
     83ifeq ($(BUILD_TYPE),debug)
     84OBJS  += \
     85        common/log/log.o \
     86        common/log/logcom.o \
     87        common/log/logformat.o \
     88        common/string/strformat.o \
     89        common/string/strformatrt.o \
     90        common/string/strprintf.o \
     91        common/string/strtonum.o \
     92        r0drv/linux/RTLogWriteDebugger-r0drv-linux.o \
     93        generic/RTLogWriteStdErr-stub-generic.o \
     94        generic/RTLogWriteStdOut-stub-generic.o \
     95        generic/RTLogWriteUser-generic.o \
     96        VBox/log-vbox.o \
     97        VBox/strformat-vbox.o
     98endif
    7099
    71100ifneq ($(MAKECMDGOALS),clean)
     
    143172 export INCL
    144173endif
    145 KFLAGS   := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0
     174KFLAGS   := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX
    146175ifndef CONFIG_VBOXDRV_FIXEDMAJOR
    147176 KFLAGS  += -DCONFIG_VBOXDRV_AS_MISC
     
    152181 KFLAGS  += -DRT_ARCH_X86
    153182endif
    154 #ifeq ($(BUILD_TYPE),debug) - you'll have to enable this manually to get debug stuff.
    155 #KFLAGS   += -DDEBUG
    156 #endif
     183ifeq ($(BUILD_TYPE),debug)
     184 KFLAGS  += -DDEBUG -DDEBUG_$(USER)
     185endif
    157186
    158187#
  • trunk/src/VBox/HostDrivers/Support/linux/files_vboxdrv

    r5999 r6493  
    2929    ${PATH_ROOT}/include/iprt/avl.h=>include/iprt/avl.h \
    3030    ${PATH_ROOT}/include/iprt/cdefs.h=>include/iprt/cdefs.h \
     31    ${PATH_ROOT}/include/iprt/ctype.h=>include/iprt/ctype.h \
    3132    ${PATH_ROOT}/include/iprt/err.h=>include/iprt/err.h \
    3233    ${PATH_ROOT}/include/iprt/heap.h=>include/iprt/heap.h \
     
    5758    ${PATH_ROOT}/src/VBox/HostDrivers/Support/SUPDRVShared.c=>SUPDRVShared.c \
    5859    ${PATH_ROOT}/src/VBox/Runtime/common/alloc/heapsimple.cpp=>alloc/heapsimple.c \
     60    ${PATH_ROOT}/src/VBox/Runtime/common/log/log.cpp=>common/log/log.c \
     61    ${PATH_ROOT}/src/VBox/Runtime/common/log/logcom.cpp=>common/log/logcom.c \
     62    ${PATH_ROOT}/src/VBox/Runtime/common/log/logformat.cpp=>common/log/logformat.c \
    5963    ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/divdi3.c=>math/gcc/divdi3.c \
    6064    ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/qdivrem.c=>math/gcc/qdivrem.c \
    6165    ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/quad.h=>math/gcc/quad.h \
     66    ${PATH_ROOT}/src/VBox/Runtime/common/string/strformat.cpp=>common/string/strformat.c \
     67    ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatrt.cpp=>common/string/strformatrt.c \
     68    ${PATH_ROOT}/src/VBox/Runtime/common/string/strprintf.cpp=>common/string/strprintf.c \
     69    ${PATH_ROOT}/src/VBox/Runtime/common/string/strtonum.cpp=>common/string/strtonum.c \
    6270    ${PATH_ROOT}/src/VBox/Runtime/include/internal/initterm.h=>include/internal/initterm.h \
    6371    ${PATH_ROOT}/src/VBox/Runtime/include/internal/magics.h=>include/internal/magics.h \
    6472    ${PATH_ROOT}/src/VBox/Runtime/include/internal/memobj.h=>include/internal/memobj.h \
     73    ${PATH_ROOT}/src/VBox/Runtime/include/internal/string.h=>include/internal/string.h \
    6574    ${PATH_ROOT}/src/VBox/Runtime/include/internal/thread.h=>include/internal/thread.h \
     75    ${PATH_ROOT}/src/VBox/Runtime/generic/RTLogWriteStdErr-stub-generic.cpp=>generic/RTLogWriteStdErr-stub-generic.c \
     76    ${PATH_ROOT}/src/VBox/Runtime/generic/RTLogWriteStdOut-stub-generic.cpp=>generic/RTLogWriteStdOut-stub-generic.c \
     77    ${PATH_ROOT}/src/VBox/Runtime/generic/RTLogWriteUser-generic.cpp=>generic/RTLogWriteUser-generic.c \
    6678    ${PATH_ROOT}/src/VBox/Runtime/r0drv/alloc-r0drv.cpp=>r0drv/alloc-r0drv.c \
    6779    ${PATH_ROOT}/src/VBox/Runtime/r0drv/alloc-r0drv.h=>r0drv/alloc-r0drv.h \
    6880    ${PATH_ROOT}/src/VBox/Runtime/r0drv/initterm-r0drv.cpp=>r0drv/initterm-r0drv.c \
     81    ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/RTLogWriteDebugger-r0drv-linux.c=>r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
    6982    ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c=>r0drv/linux/alloc-r0drv-linux.c \
    7083    ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c=>r0drv/linux/initterm-r0drv-linux.c \
     
    7992    ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c=>r0drv/linux/thread-r0drv-linux.c \
    8093    ${PATH_ROOT}/src/VBox/Runtime/r0drv/memobj-r0drv.cpp=>r0drv/memobj-r0drv.c \
     94    ${PATH_ROOT}/src/VBox/Runtime/VBox/log-vbox.cpp=>VBox/log-vbox.c \
     95    ${PATH_ROOT}/src/VBox/Runtime/VBox/strformat-vbox.cpp=>VBox/strformat-vbox.c \
    8196    ${PATH_OUT}/version-generated.h=>version-generated.h \
    8297"
  • trunk/src/VBox/Runtime/common/log/log.cpp

    r5999 r6493  
    13921392        }
    13931393
    1394         for (unsigned j = 0; j < 10; j++)
     1394        unsigned j;
     1395        for (j = 0; j < 10; j++)
    13951396        {
    13961397            i = ELEMENTS(g_aPerThreadLoggers);
  • trunk/src/VBox/Runtime/common/log/logcom.cpp

    r5999 r6493  
    101101RTDECL(void) RTLogWriteCom(const char *pach, size_t cb)
    102102{
    103     for (const uint8_t *pu8 = (const uint8_t *)pach; cb-- > 0; pu8++)
     103    const uint8_t *pu8;
     104    for (pu8 = (const uint8_t *)pach; cb-- > 0; pu8++)
    104105    {
    105106        /* expand \n -> \r\n */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette