init ranges later
This commit is contained in:
parent
e6434d2ec2
commit
97c169fe63
@ -11,6 +11,7 @@ pub struct DrCovRuntime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl DrCovRuntime {
|
impl DrCovRuntime {
|
||||||
|
#[must_use]
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
drcov_basic_blocks: vec![],
|
drcov_basic_blocks: vec![],
|
||||||
@ -18,6 +19,11 @@ impl DrCovRuntime {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn init(&mut self, ranges: &RangeMap<usize, (u16, String)>) {
|
||||||
|
self.ranges = ranges.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::unused_self)]
|
||||||
pub fn pre_exec<I: Input + HasTargetBytes>(&mut self, _input: &I) -> Result<(), Error> {
|
pub fn pre_exec<I: Input + HasTargetBytes>(&mut self, _input: &I) -> Result<(), Error> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -377,6 +377,8 @@ impl<'a> FridaInstrumentationHelper<'a> {
|
|||||||
if helper.options().asan_enabled() || helper.options().drcov_enabled() {
|
if helper.options().asan_enabled() || helper.options().drcov_enabled() {
|
||||||
helper.asan_runtime.init(gum, modules_to_instrument);
|
helper.asan_runtime.init(gum, modules_to_instrument);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
helper.drcov_runtime.init(&helper.ranges);
|
||||||
#[cfg(feature = "cmplog")]
|
#[cfg(feature = "cmplog")]
|
||||||
if helper.options.cmplog_enabled() {
|
if helper.options.cmplog_enabled() {
|
||||||
helper.cmplog_runtime.init();
|
helper.cmplog_runtime.init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user