Commit c5bcf861 authored by Matheus Marchini's avatar Matheus Marchini

fix BEGIN / END probes

BEGIN/END probes were broken after
https://github.com/iovisor/bpftrace/pull/100.
parent 2562ff60
......@@ -33,6 +33,8 @@ int BPFtrace::add_probe(ast::Probe &p)
probe.orig_name = p.name();
probe.name = p.name();
probe.loc = 0;
probe.index = attach_point->index(probe.name) > 0 ?
attach_point->index(probe.name) : p.index();
special_probes_.push_back(probe);
continue;
}
......@@ -45,6 +47,8 @@ int BPFtrace::add_probe(ast::Probe &p)
probe.orig_name = p.name();
probe.name = p.name();
probe.loc = 0;
probe.index = attach_point->index(probe.name) > 0 ?
attach_point->index(probe.name) : p.index();
special_probes_.push_back(probe);
continue;
}
......
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