diff --git a/src/agent/coverage/src/block/windows.rs b/src/agent/coverage/src/block/windows.rs
index e4c8779be2..519fa4f266 100644
--- a/src/agent/coverage/src/block/windows.rs
+++ b/src/agent/coverage/src/block/windows.rs
@@ -171,7 +171,7 @@ impl<'c> Recorder<'c> {
return Ok(());
}
- match self.cache.fetch(&path) {
+ match self.cache.fetch(&path, dbg.target().process_handle()) {
Ok(Some(info)) => {
let new = self.coverage.insert(&path, info.blocks.iter().copied());
diff --git a/src/agent/coverage/src/cache.rs b/src/agent/coverage/src/cache.rs
index 3b9eca565b..8c8085ca7e 100644
--- a/src/agent/coverage/src/cache.rs
+++ b/src/agent/coverage/src/cache.rs
@@ -6,6 +6,9 @@ use std::collections::{BTreeSet, HashMap};
use anyhow::Result;
use serde::{Deserialize, Serialize};
+#[cfg(target_os = "windows")]
+use winapi::um::winnt::HANDLE;
+
use crate::code::{ModuleIndex, ModulePath};
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
@@ -20,6 +23,7 @@ impl ModuleCache {
Self { cached }
}
+ #[cfg(target_os = "linux")]
pub fn fetch(&mut self, path: &ModulePath) -> Result