summaryrefslogtreecommitdiff
path: root/include/libelfu
diff options
context:
space:
mode:
Diffstat (limited to 'include/libelfu')
-rw-r--r--include/libelfu/debug.h11
-rw-r--r--include/libelfu/libelfu.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/include/libelfu/debug.h b/include/libelfu/debug.h
new file mode 100644
index 0000000..4c82345
--- /dev/null
+++ b/include/libelfu/debug.h
@@ -0,0 +1,11 @@
+#ifndef __LIBELFU_DEBUG_H_
+#define __LIBELFU_DEBUG_H_
+
+#include <stdio.h>
+
+
+#define ELFU_WARN(...) do { fprintf(stderr, __VA_ARGS__); } while(0)
+
+#define ELFU_WARNELF(function_name) ELFU_WARN(function_name "() failed: %s\n", elf_errmsg(-1))
+
+#endif
diff --git a/include/libelfu/libelfu.h b/include/libelfu/libelfu.h
index 1fc613a..cc55282 100644
--- a/include/libelfu/libelfu.h
+++ b/include/libelfu/libelfu.h
@@ -9,5 +9,6 @@
#include <libelfu/modeltypes.h>
#include <libelfu/modelops.h>
+#include <libelfu/debug.h>
#endif