/* * Copyright 2025, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. */ #ifndef NFS4_DEBUG_H #define NFS4_DEBUG_H #ifdef USER #define _KERNEL_MODE // skip the POSIX dprintf declaration in stdio.h #include #undef _KERNEL_MODE #endif #include #define TRACE(x...) FUNCTION(x) #define CALLED() FUNCTION_START() #if KDEBUG # define ASSERT_WITH_DUMP(expr,obj) \ do { \ if (!(expr)) { \ obj->Dump(); \ panic("ASSERT FAILED (%s:%d): %s", __FILE__, __LINE__, #expr); \ } \ } while (0) #else # define ASSERT_WITH_DUMP(expr,obj) do { } while(0) #endif // KDEBUG #if USER extern "C" void dprintf(const char *format, ...); #endif int kprintf_volume(int argc, char** argv); int kprintf_inode(int argc, char** argv); #endif // NFS4_DEBUG_H