From 486cfc409b07f3fb14e4c0c04cff72930636c574 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Mon, 10 Jan 2022 14:48:27 -0500 Subject: [PATCH] Correct typo and include information about location of target being analyzed. --- analysis.cxx | 5 +++-- analysis.h | 1 + tapsets.cxx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/analysis.cxx b/analysis.cxx index bff499bb5..813e48699 100644 --- a/analysis.cxx +++ b/analysis.cxx @@ -225,6 +225,7 @@ typedef map precomputed_liveness; static precomputed_liveness cached_liveness; int liveness(systemtap_session& s, + target_symbol *e, string executable, Dwarf_Addr addr, location_context ctx) @@ -235,8 +236,8 @@ int liveness(systemtap_session& s, // Punt if unsuccessful in parsing binary if (!func_to_analyze.co){ - s.print_warning(_F("livenss analysis unable to parse binary %s", - executable.c_str())); + s.print_warning(_F("liveness analysis unable to parse binary %s", + executable.c_str()), e->tok); return 0; } diff --git a/analysis.h b/analysis.h index d26fcab1c..24eb01e8c 100644 --- a/analysis.h +++ b/analysis.h @@ -18,6 +18,7 @@ #ifdef HAVE_DYNINST extern int liveness(systemtap_session& s, + target_symbol *e, std::string executable, Dwarf_Addr location, location_context ctx); diff --git a/tapsets.cxx b/tapsets.cxx index 05d5f31e6..8fc5146e2 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -4732,7 +4732,7 @@ dwarf_var_expanding_visitor::visit_target_symbol (target_symbol *e) // Now that have location information check if change to variable has any effect if (lvalue) { - if (liveness(q.sess, q.dw.mod_info->elf_path, addr, ctx) < 0) { + if (liveness(q.sess, e, q.dw.mod_info->elf_path, addr, ctx) < 0) { q.sess.print_warning(_F("write at %p will have no effect", (void *)addr), e->tok); } -- 2.43.5