assert-r0drv-nt.cpp revision 88774d64402bfd32254fcc5a81bda121c68300e6
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync/* $Id$ */
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync/** @file
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync * IPRT - Assertion Workers, Ring-0 Drivers, NT.
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync */
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync/*
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Copyright (C) 2006-2008 Sun Microsystems, Inc.
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync *
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync * available from http://www.virtualbox.org. This file is free software;
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync * you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync *
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * The contents of this file may alternatively be used under the terms
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * of the Common Development and Distribution License Version 1.0
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync * VirtualBox OSE distribution, in which case the provisions of the
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync * CDDL are applicable instead of those of the GPL.
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync *
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync * You may elect to license modified versions of this file under the
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync * terms and conditions of either the GPL or the CDDL or both.
f84cd77241a1c4b9106a92280611c659243e10d1vboxsync *
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
d31ded334a29f575e23dc889b603b1a586759348vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync * additional information or have any questions.
d31ded334a29f575e23dc889b603b1a586759348vboxsync */
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync/*******************************************************************************
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync* Header Files *
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync*******************************************************************************/
590bfe12ce22cd3716448fbb9f4dc51664bfe5e2vboxsync#include "the-nt-kernel.h"
611910c4ba57eb6db5c0d508ca7b923efd654aecvboxsync
611910c4ba57eb6db5c0d508ca7b923efd654aecvboxsync#include <iprt/assert.h>
134a71c1528b56afe4db843ab63ec5a5b849535bvboxsync#include <iprt/log.h>
611910c4ba57eb6db5c0d508ca7b923efd654aecvboxsync#include <iprt/string.h>
611910c4ba57eb6db5c0d508ca7b923efd654aecvboxsync#include <iprt/stdarg.h>
611910c4ba57eb6db5c0d508ca7b923efd654aecvboxsync
134a71c1528b56afe4db843ab63ec5a5b849535bvboxsync#include "internal/assert.h"
134a71c1528b56afe4db843ab63ec5a5b849535bvboxsync
611910c4ba57eb6db5c0d508ca7b923efd654aecvboxsync
611910c4ba57eb6db5c0d508ca7b923efd654aecvboxsyncvoid rtR0AssertNativeMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
134a71c1528b56afe4db843ab63ec5a5b849535bvboxsync{
134a71c1528b56afe4db843ab63ec5a5b849535bvboxsync DbgPrint("\n!!Assertion Failed!!\n"
289060a0c3cb1d509f2cb01fca060796212376f6vboxsync "Expression: %s\n"
289060a0c3cb1d509f2cb01fca060796212376f6vboxsync "Location : %s(%d) %s\n",
289060a0c3cb1d509f2cb01fca060796212376f6vboxsync pszExpr, pszFile, uLine, pszFunction);
289060a0c3cb1d509f2cb01fca060796212376f6vboxsync}
590bfe12ce22cd3716448fbb9f4dc51664bfe5e2vboxsync
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsyncvoid rtR0AssertNativeMsg2V(const char *pszFormat, va_list va)
6420f75ffc86ab6494eb5e95418f0c95e71e8068vboxsync{
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync char szMsg[256];
6420f75ffc86ab6494eb5e95418f0c95e71e8068vboxsync
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync RTStrPrintfV(szMsg, sizeof(szMsg) - 1, pszFormat, va);
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync szMsg[sizeof(szMsg) - 1] = '\0';
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync DbgPrint("%s", szMsg);
6420f75ffc86ab6494eb5e95418f0c95e71e8068vboxsync}
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync
faf968cea88f2ab4bcc3325b17bc8b095a8e3642vboxsync
6420f75ffc86ab6494eb5e95418f0c95e71e8068vboxsyncRTR0DECL(void) RTR0AssertPanicSystem(void)
436b5c616e019c5e62053657c52d3ab5562ecbbfvboxsync{
436b5c616e019c5e62053657c52d3ab5562ecbbfvboxsync /** @todo implement RTR0AssertPanicSystem. */
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync}
faf968cea88f2ab4bcc3325b17bc8b095a8e3642vboxsync
3609dfc9f2733f4dc836c6a6bb3745398f280fcevboxsync