2013-02-22 09:07:31 +04:00
|
|
|
/*
|
2015-01-02 02:04:46 +03:00
|
|
|
* Copyright 2011-2015 Branimir Karadzic. All rights reserved.
|
2013-02-22 09:07:31 +04:00
|
|
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
2013-11-15 07:10:10 +04:00
|
|
|
#ifndef DBG_H_HEADER_GUARD
|
|
|
|
#define DBG_H_HEADER_GUARD
|
2013-02-22 09:07:31 +04:00
|
|
|
|
|
|
|
#include <stdarg.h> // va_list
|
2013-05-01 10:10:29 +04:00
|
|
|
#include <stdint.h>
|
2013-02-22 09:07:31 +04:00
|
|
|
|
|
|
|
#define DBG_STRINGIZE(_x) DBG_STRINGIZE_(_x)
|
|
|
|
#define DBG_STRINGIZE_(_x) #_x
|
|
|
|
#define DBG_FILE_LINE_LITERAL "" __FILE__ "(" DBG_STRINGIZE(__LINE__) "): "
|
|
|
|
#define DBG(_format, ...) dbgPrintf(DBG_FILE_LINE_LITERAL "" _format "\n", ##__VA_ARGS__)
|
|
|
|
|
|
|
|
extern void dbgPrintfVargs(const char* _format, va_list _argList);
|
|
|
|
extern void dbgPrintf(const char* _format, ...);
|
|
|
|
extern void dbgPrintfData(const void* _data, uint32_t _size, const char* _format, ...);
|
|
|
|
|
2013-11-15 07:10:10 +04:00
|
|
|
#endif // DBG_H_HEADER_GUARD
|