kHlpAssert-iprt.cpp revision 418057d73dc51145e5a2f1ee0ac4288ee90fd2de
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync/* $Id$ */
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync/** @file
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * kHlpEnv - Assertions, IPRT based implementation.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync */
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync/*
f14d3c62ebf4ccb64bd11528e5c4ec60b4528a1avboxsync * Copyright (C) 2009 Sun Microsystems, Inc.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync *
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * available from http://www.virtualbox.org. This file is free software;
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * you can redistribute it and/or modify it under the terms of the GNU
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * General Public License (GPL) as published by the Free Software
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync *
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * additional information or have any questions.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync */
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync/*******************************************************************************
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync* Header Files *
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync*******************************************************************************/
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync#include <k/kHlpAssert.h>
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync#include <iprt/stdarg.h>
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync#include <iprt/assert.h>
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync#include <iprt/string.h>
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync#include <iprt/err.h>
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncKHLP_DECL(void) kHlpAssertMsg1(const char *pszExpr, const char *pszFile, unsigned iLine, const char *pszFunction)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync{
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync RTAssertMsg1Weak(pszExpr, iLine, pszFile, pszFunction);
628ddfbd43ad5365d69fddda4007598242956577vboxsync}
628ddfbd43ad5365d69fddda4007598242956577vboxsync
628ddfbd43ad5365d69fddda4007598242956577vboxsync
628ddfbd43ad5365d69fddda4007598242956577vboxsyncKHLP_DECL(void) kHlpAssertMsg2(const char *pszFormat, ...)
628ddfbd43ad5365d69fddda4007598242956577vboxsync{
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync va_list va;
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync va_start(va, pszFormat);
3c520cf6887d9039d9aa7cf3bbe81fd7de1ffd4cvboxsync RTAssertMsg2WeakV(pszFormat, va);
f14d3c62ebf4ccb64bd11528e5c4ec60b4528a1avboxsync va_end(va);
f14d3c62ebf4ccb64bd11528e5c4ec60b4528a1avboxsync}
f14d3c62ebf4ccb64bd11528e5c4ec60b4528a1avboxsync
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync