]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/objtool/warn.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatchin...
[linux.git] / tools / objtool / warn.h
index afd9f7a05f6d1ead695f3e26b79f9001cae5b6c6..f4fbb972b611c45a360f1095dbada9e98adcfa26 100644 (file)
@@ -64,6 +64,14 @@ static inline char *offstr(struct section *sec, unsigned long offset)
        free(_str);                                     \
 })
 
+#define BT_FUNC(format, insn, ...)                     \
+({                                                     \
+       struct instruction *_insn = (insn);             \
+       char *_str = offstr(_insn->sec, _insn->offset); \
+       WARN("  %s: " format, _str, ##__VA_ARGS__);     \
+       free(_str);                                     \
+})
+
 #define WARN_ELF(format, ...)                          \
        WARN(format ": %s", ##__VA_ARGS__, elf_errmsg(-1))