Commit 86d6c288 authored by Matheus Marchini's avatar Matheus Marchini

fixup! attach to multiple identical probes

parent bd71f2fd
......@@ -337,9 +337,10 @@ std::unique_ptr<AttachedProbe> BPFtrace::attach_probe(Probe &probe, const BpfOrc
int BPFtrace::run(std::unique_ptr<BpfOrc> bpforc)
{
for (Probe &probe : special_probes_)
auto r_special_probes = special_probes_.rbegin();
for (; r_special_probes != special_probes_.rend(); ++r_special_probes)
{
auto attached_probe = attach_probe(probe, *bpforc.get());
auto attached_probe = attach_probe(*r_special_probes, *bpforc.get());
if (attached_probe == nullptr)
return -1;
special_attached_probes_.push_back(std::move(attached_probe));
......@@ -351,9 +352,10 @@ int BPFtrace::run(std::unique_ptr<BpfOrc> bpforc)
BEGIN_trigger();
for (Probe &probe : probes_)
auto r_probes = probes_.rbegin();
for (; r_probes != probes_.rend(); ++r_probes)
{
auto attached_probe = attach_probe(probe, *bpforc.get());
auto attached_probe = attach_probe(*r_probes, *bpforc.get());
if (attached_probe == nullptr)
return -1;
attached_probes_.push_back(std::move(attached_probe));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment