fix a typo in error messages in BPF::attach_usdt()
authorGoro Fuji <goro@fastly.com>
Thu, 11 Feb 2021 07:59:05 +0000 (07:59 +0000)
committeryonghong-song <ys114321@gmail.com>
Thu, 11 Feb 2021 16:16:02 +0000 (08:16 -0800)
it was something like: "Unable to enable USDT %sprovider:probe from binary  PID 1234 for
probe handle_probe"

src/cc/api/BPF.cc

index 971cb5ac7645bf3c4964fc0ade31131aa96d2de5..04ef3bf7e10ab8994c832121b9cfc51242eac47f 100644 (file)
@@ -303,7 +303,7 @@ StatusTuple BPF::attach_uprobe(const std::string& binary_path,
 StatusTuple BPF::attach_usdt_without_validation(const USDT& u, pid_t pid) {
   auto& probe = *static_cast<::USDT::Probe*>(u.probe_.get());
   if (!uprobe_ref_ctr_supported() && !probe.enable(u.probe_func_))
-    return StatusTuple(-1, "Unable to enable USDT %s" + u.print_name());
+    return StatusTuple(-1, "Unable to enable USDT %s", u.print_name().c_str());
 
   bool failed = false;
   std::string err_msg;