summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/include/uhd/utils/msg.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/host/include/uhd/utils/msg.hpp b/host/include/uhd/utils/msg.hpp
index 3aac9577a..2cc5893e7 100644
--- a/host/include/uhd/utils/msg.hpp
+++ b/host/include/uhd/utils/msg.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2011 Ettus Research LLC
+// Copyright 2011-2013 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -21,6 +21,7 @@
#include <uhd/config.hpp>
#include <uhd/utils/pimpl.hpp>
#include <ostream>
+#include <iomanip>
#include <string>
/*!
@@ -38,6 +39,10 @@
#define UHD_VAR(var) \
UHD_MSG(status) << #var << " = " << var << std::endl;
+//! Helpful debug tool to print a variable in hex
+#define UHD_HEX(var) \
+ UHD_MSG(status) << #var << " = 0x" << std::hex << std::setfill('0') << std::setw(8) << var << std::dec << std::endl;
+
namespace uhd{ namespace msg{
//! Possible message types