From 1723dc79c8031da18f8cfe3fc456d979f491fa2e Mon Sep 17 00:00:00 2001 From: Serhei Makarov Date: Mon, 1 Feb 2021 13:06:05 -0500 Subject: [PATCH] stap.bpf optional debugging aid :: show location of bpfasm-embeddedcode --- bpf-translate.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bpf-translate.cxx b/bpf-translate.cxx index e02ad4901..0f4a7de7f 100644 --- a/bpf-translate.cxx +++ b/bpf-translate.cxx @@ -1480,6 +1480,9 @@ bpf_unparser::visit_embeddedcode (embeddedcode *s) { #ifdef DEBUG_CODEGEN this_ins.notes.push("asm"); + // XXX verbose; for more precise diagnostics: + //std::stringstream os; os << s->tok->location; + //this_ins.notes.push("asm@" + os.str()); #endif // XXX allocate asm_stmts off the stack to avoid deallocating tok on throw std::vector *statements_p = new std::vector; -- 2.43.5