Added DUMP() and PDUMP() macros.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3355 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -70,6 +70,7 @@ enum _DebugCategoryFlags {
|
|||||||
\brief Bitmask of currently enabled debugging categories.
|
\brief Bitmask of currently enabled debugging categories.
|
||||||
*/
|
*/
|
||||||
#define CATEGORY_FILTER CF_ALL
|
#define CATEGORY_FILTER CF_ALL
|
||||||
|
//#define CATEGORY_FILTER ~CF_DUMP
|
||||||
//#define CATEGORY_FILTER CF_ALL_STANDARD
|
//#define CATEGORY_FILTER CF_ALL_STANDARD
|
||||||
//#define CATEGORY_FILTER CF_ENTRY
|
//#define CATEGORY_FILTER CF_ENTRY
|
||||||
//#define CATEGORY_FILTER (CF_ENTRY | CF_PUBLIC)
|
//#define CATEGORY_FILTER (CF_ENTRY | CF_PUBLIC)
|
||||||
@@ -196,6 +197,20 @@ private:
|
|||||||
PRINT_INDENT(); \
|
PRINT_INDENT(); \
|
||||||
SIMPLE_PRINT(("------------------------------------------------------------\n"));
|
SIMPLE_PRINT(("------------------------------------------------------------\n"));
|
||||||
|
|
||||||
|
#define DUMP(object) \
|
||||||
|
if ((_debugHelper.CategoryFlags() & CATEGORY_FILTER) \
|
||||||
|
== _debugHelper.CategoryFlags()) \
|
||||||
|
{ \
|
||||||
|
(object).dump(); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define PDUMP(objectPointer) \
|
||||||
|
if ((_debugHelper.CategoryFlags() & CATEGORY_FILTER) \
|
||||||
|
== _debugHelper.CategoryFlags()) \
|
||||||
|
{ \
|
||||||
|
(objectPointer)->dump(); \
|
||||||
|
}
|
||||||
|
|
||||||
#define REPORT_ERROR(err) { \
|
#define REPORT_ERROR(err) { \
|
||||||
LPRINT(("returning error 0x%lx, `%s'\n", err, strerror(err))); \
|
LPRINT(("returning error 0x%lx, `%s'\n", err, strerror(err))); \
|
||||||
}
|
}
|
||||||
@@ -235,6 +250,8 @@ private:
|
|||||||
#define SIMPLE_PRINT(x) ;
|
#define SIMPLE_PRINT(x) ;
|
||||||
#define PRINT_INDENT(x) ;
|
#define PRINT_INDENT(x) ;
|
||||||
#define PRINT_DIVIDER() ;
|
#define PRINT_DIVIDER() ;
|
||||||
|
#define DUMP(object) ;
|
||||||
|
#define PDUMP(objectPointer) ;
|
||||||
#define REPORT_ERROR(status) ;
|
#define REPORT_ERROR(status) ;
|
||||||
#define RETURN_ERROR(status) return status;
|
#define RETURN_ERROR(status) return status;
|
||||||
#define RETURN(status) return status;
|
#define RETURN(status) return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user