Changeset 13314 in vbox
- Timestamp:
- Oct 15, 2008 10:46:08 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 37987
- Location:
- trunk
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/assert.h
r13311 r13314 126 126 #endif 127 127 128 /** @name Globals for crash analysis 129 * @remarks This is the full potential set, it 130 * @{ 131 */ 128 132 /** The last assert message, 1st part. */ 129 extern RTDATADECL(char) g_szRTAssertMsg1[1024];133 extern RTDATADECL(char) g_szRTAssertMsg1[1024]; 130 134 /** The last assert message, 2nd part. */ 131 extern RTDATADECL(char) g_szRTAssertMsg2[2048]; 135 extern RTDATADECL(char) g_szRTAssertMsg2[2048]; 136 /** The last assert message, expression. */ 137 extern RTDATADECL(const char * volatile) g_pszRTAssertExpr; 138 /** The last assert message, file name. */ 139 extern RTDATADECL(const char * volatile) g_pszRTAssertFile; 140 /** The last assert message, line number. */ 141 extern RTDATADECL(uint32_t volatile) g_u32RTAssertLine; 142 /** The last assert message, function name. */ 143 extern RTDATADECL(const char * volatile) g_pszRTAssertFunction; 144 /** @} */ 132 145 133 146 __END_DECLS -
trunk/src/VBox/Additions/linux/module/Makefile.module
r11876 r13314 71 71 r0drv/alloc-r0drv.o \ 72 72 r0drv/linux/alloc-r0drv-linux.o \ 73 r0drv/linux/assert-r0drv-linux.o \ 73 74 r0drv/linux/semevent-r0drv-linux.o \ 74 75 r0drv/linux/semfastmutex-r0drv-linux.o \ … … 79 80 umoddi3.o \ 80 81 qdivrem.o \ 81 assert.o \82 82 logbackdoor.o \ 83 83 logformat.o \ … … 85 85 strformatrt.o \ 86 86 strformattype.o \ 87 strformat-vbox.o 87 strformat-vbox.o \ 88 RTAssertShouldPanic-generic.o 88 89 ifeq ($(BUILD_TARGET_ARCH),amd64) 89 90 OBJS += \ -
trunk/src/VBox/Additions/linux/module/files_vboxadd
r11519 r13314 66 66 ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivdi3.c=>udivdi3.c \ 67 67 ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/umoddi3.c=>umoddi3.c \ 68 ${PATH_ROOT}/src/VBox/Runtime/common/misc/assert.cpp=>assert.c \69 68 ${PATH_ROOT}/src/VBox/Runtime/common/string/strformat.cpp=>strformat.c \ 70 69 ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatrt.cpp=>strformatrt.c \ 71 70 ${PATH_ROOT}/src/VBox/Runtime/common/string/strformattype.cpp=>strformattype.c \ 71 ${PATH_ROOT}/src/VBox/Runtime/generic/RTAssertShouldPanic-generic.cpp=>RTAssertShouldPanic-generic.cpp \ 72 72 ${PATH_ROOT}/src/VBox/Runtime/r0drv/alloc-r0drv.cpp=>r0drv/alloc-r0drv.c \ 73 73 ${PATH_ROOT}/src/VBox/Runtime/r0drv/alloc-r0drv.h=>r0drv/alloc-r0drv.h \ 74 74 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c=>r0drv/linux/alloc-r0drv-linux.c \ 75 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c=>r0drv/linux/assert-r0drv-linux.c \ 75 76 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c=>r0drv/linux/semevent-r0drv-linux.c \ 76 77 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c=>r0drv/linux/semeventmulti-r0drv-linux.c \ -
trunk/src/VBox/Additions/linux/module/vboxmod.c
r12280 r13314 1 1 /** @file 2 *3 2 * vboxadd -- VirtualBox Guest Additions for Linux 4 3 */ … … 85 84 #endif 86 85 87 /* This is called by our assert macros to find out whether we want88 to insert a breakpoint after the assertion. In kernel modules we89 do not of course. */90 RTDECL(bool) RTAssertDoBreakpoint(void)91 {92 return false;93 }94 EXPORT_SYMBOL(RTAssertDoBreakpoint);95 96 86 /** device extension structure (we only support one device instance) */ 97 87 static VBoxDevice *vboxDev = NULL; … … 115 105 EXPORT_SYMBOL (vboxadd_cmc_open); 116 106 EXPORT_SYMBOL (vboxadd_cmc_close); 107 108 /** @todo check that this works for all the kernels. */ 109 EXPORT_SYMBOL (RTR0AssertPanicSystem); 110 EXPORT_SYMBOL (RTAssertShouldPanic); 111 EXPORT_SYMBOL (AssertMsg1); 112 EXPORT_SYMBOL (AssertMsg2); 113 117 114 118 115 #define MAX_HGCM_CONNECTIONS 1024 … … 599 596 600 597 /** 601 * Dummy read function - we only supply this because we implement poll and 598 * Dummy read function - we only supply this because we implement poll and 602 599 * fasync. 603 600 */ … … 1167 1164 MODULE_DEVICE_TABLE(pci, vmmdev_pci_id); 1168 1165 1169 int __gxx_personality_v0 = 0xdeadbeef; 1166 1170 1167 1171 1168 /* … … 1176 1173 * End: 1177 1174 */ 1175 -
trunk/src/VBox/HostDrivers/Support/linux/Makefile
r13306 r13314 77 77 r0drv/memobj-r0drv.o \ 78 78 r0drv/mpnotification-r0drv.o \ 79 r0drv/linux/assert-r0drv-linux.o \ 79 80 r0drv/linux/alloc-r0drv-linux.o \ 80 81 r0drv/linux/initterm-r0drv-linux.o \ … … 91 92 r0drv/linux/timer-r0drv-linux.o \ 92 93 common/err/RTErrConvertFromErrno.o \ 93 generic/RTAssertShouldPanic-generic.o 94 ifeq ($(BUILD_TARGET_ARCH),x86) 95 OBJS += math/gcc/divdi3.o \ 96 math/gcc/moddi3.o \ 97 math/gcc/qdivrem.o \ 98 math/gcc/udivdi3.o 99 endif 100 ifeq ($(BUILD_TARGET_ARCH),amd64) 101 OBJS += alloc/heapsimple.o 102 endif 103 104 ifeq ($(BUILD_TYPE),debug) 105 OBJS += common/log/log.o \ 94 common/log/log.o \ 106 95 common/log/logellipsis.o \ 107 96 common/log/logrel.o \ … … 115 104 common/string/strtonum.o \ 116 105 r0drv/linux/RTLogWriteDebugger-r0drv-linux.o \ 106 generic/RTAssertShouldPanic-generic.o \ 117 107 generic/RTLogWriteStdErr-stub-generic.o \ 118 108 generic/RTLogWriteStdOut-stub-generic.o \ … … 122 112 ifeq ($(BUILD_TARGET_ARCH),x86) 123 113 OBJS += math/gcc/divdi3.o \ 114 math/gcc/moddi3.o \ 115 math/gcc/qdivrem.o \ 116 math/gcc/udivdi3.o \ 117 math/gcc/divdi3.o \ 124 118 math/gcc/umoddi3.o 125 119 endif 126 endif # debug 120 ifeq ($(BUILD_TARGET_ARCH),amd64) 121 OBJS += alloc/heapsimple.o 122 endif 127 123 128 124 ifneq ($(MAKECMDGOALS),clean) -
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r13306 r13314 944 944 } 945 945 946 947 /** @todo move to IPRT! */948 RTDECL(void) AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)949 {950 printk("!!Assertion Failed!!\n"951 "Expression: %s\n"952 "Location : %s(%d) %s\n",953 pszExpr, pszFile, uLine, pszFunction);954 }955 956 957 /** @todo move to IPRT! */958 RTDECL(void) AssertMsg2(const char *pszFormat, ...)959 { /* forwarder. */960 va_list ap;961 char msg[256];962 963 va_start(ap, pszFormat);964 vsnprintf(msg, sizeof(msg) - 1, pszFormat, ap);965 msg[sizeof(msg) - 1] = '\0';966 printk("%s", msg);967 va_end(ap);968 }969 970 971 /* GCC C++ hack. (shouldn't be necessary with the right exception flags...) */972 unsigned __gxx_personality_v0 = 0xcccccccc;973 974 975 946 module_init(VBoxDrvLinuxInit); 976 947 module_exit(VBoxDrvLinuxUnload); -
trunk/src/VBox/HostDrivers/Support/linux/files_vboxdrv
r13306 r13314 99 99 ${PATH_ROOT}/src/VBox/Runtime/r0drv/mpnotification-r0drv.c=>r0drv/mpnotification-r0drv.c \ 100 100 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/RTLogWriteDebugger-r0drv-linux.c=>r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \ 101 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c=>r0drv/linux/assert-r0drv-linux.c \ 101 102 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c=>r0drv/linux/alloc-r0drv-linux.c \ 102 103 ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c=>r0drv/linux/initterm-r0drv-linux.c \ -
trunk/src/VBox/Runtime/Makefile.kmk
r13306 r13314 980 980 r0drv/generic/RTThreadPreemptRestore-r0drv-generic.cpp \ 981 981 r0drv/linux/alloc-r0drv-linux.c \ 982 r0drv/linux/assert-r0drv-linux.c \ 982 983 r0drv/linux/initterm-r0drv-linux.c \ 983 984 r0drv/linux/memobj-r0drv-linux.c \ -
trunk/src/VBox/Runtime/r0drv/darwin/assert-r0drv-darwin.cpp
r13312 r13314 49 49 /** The last assert message, 2nd part. */ 50 50 RTDATADECL(char) g_szRTAssertMsg2[2048]; 51 /** The last assert message, expression. */ 52 RTDATADECL(const char * volatile) g_pszRTAssertExpr; 51 53 /** The last assert message, file name. */ 52 RTDATADECL(const char * ) volatileg_pszRTAssertFile;54 RTDATADECL(const char * volatile) g_pszRTAssertFile; 53 55 /** The last assert message, line number. */ 54 RTDATADECL(uint32_t ) volatileg_u32RTAssertLine;56 RTDATADECL(uint32_t volatile) g_u32RTAssertLine; 55 57 /** The last assert message, function name. */ 56 RTDATADECL(const char * ) volatileg_pszRTAssertFunction;58 RTDATADECL(const char * volatile) g_pszRTAssertFunction; 57 59 58 60 … … 76 78 "Location : %s(%d) %s\n", 77 79 pszExpr, pszFile, uLine, pszFunction); 80 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertExpr, (void *)pszExpr); 78 81 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertFile, (void *)pszFile); 79 82 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertFunction, (void *)pszFunction); -
trunk/src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c
r13310 r13314 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT - Assertion Workers, Ring-0 Drivers, Darwin.3 * IPRT - Assertion Workers, Ring-0 Drivers, Linux. 4 4 */ 5 5 … … 33 33 * Header Files * 34 34 *******************************************************************************/ 35 #include "the- darwin-kernel.h"35 #include "the-linux-kernel.h" 36 36 37 37 #include <iprt/assert.h> … … 49 49 /** The last assert message, 2nd part. */ 50 50 RTDATADECL(char) g_szRTAssertMsg2[2048]; 51 /** The last assert message, file name. */ 52 RTDATADECL(const char *) volatile g_pszRTAssertExpr; 51 53 /** The last assert message, file name. */ 52 54 RTDATADECL(const char *) volatile g_pszRTAssertFile; … … 66 68 #endif 67 69 68 print f("\r\n!!Assertion Failed!!\r\n"70 printk("\r\n!!Assertion Failed!!\r\n" 69 71 "Expression: %s\r\n" 70 72 "Location : %s(%d) %s\r\n", … … 76 78 "Location : %s(%d) %s\n", 77 79 pszExpr, pszFile, uLine, pszFunction); 78 ASMAtomicUoWritePtr(&g_pszRTAssertFile, pszFile); 80 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertExpr, (void *)pszExpr); 81 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertFile, (void *)pszFile); 82 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertFunction, (void *)pszFunction); 79 83 ASMAtomicUoWriteU32(&g_u32RTAssertLine, uLine); 80 ASMAtomicUoWritePtr(&g_pszRTAssertFunction, pszFunction);81 84 } 82 85 … … 97 100 szMsg[sizeof(szMsg) - 1] = '\0'; 98 101 va_end(va); 99 print f("%s", szMsg);102 printk("%s", szMsg); 100 103 101 104 va_start(va, pszFormat); -
trunk/src/VBox/Runtime/r0drv/solaris/assert-r0drv-solaris.c
r13313 r13314 49 49 /** The last assert message, 2nd part. */ 50 50 RTDATADECL(char) g_szRTAssertMsg2[2048]; 51 /** The last assert message, expression. */ 52 RTDATADECL(const char * volatile) g_pszRTAssertExpr; 51 53 /** The last assert message, file name. */ 52 RTDATADECL(const char * ) volatileg_pszRTAssertFile;54 RTDATADECL(const char * volatile) g_pszRTAssertFile; 53 55 /** The last assert message, line number. */ 54 RTDATADECL(uint32_t ) volatileg_u32RTAssertLine;56 RTDATADECL(uint32_t volatile) g_u32RTAssertLine; 55 57 /** The last assert message, function name. */ 56 RTDATADECL(const char * ) volatileg_pszRTAssertFunction;58 RTDATADECL(const char * volatile) g_pszRTAssertFunction; 57 59 58 60 … … 77 79 "Location : %s(%d) %s\n", 78 80 pszExpr, pszFile, uLine, pszFunction); 81 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertExpr, (void *)pszExpr); 79 82 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertFile, (void *)pszFile); 80 83 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertFunction, (void *)pszFunction);
Note:
See TracChangeset
for help on using the changeset viewer.