mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Rollup merge of #49625 - bjorn3:miri_access_memory_kind, r=oli-obk
miri: add public alloc_kind accessor
This commit is contained in:
@@ -328,6 +328,10 @@ pub fn get_fn(&self, ptr: MemoryPointer) -> EvalResult<'tcx, Instance<'tcx>> {
|
||||
.ok_or(EvalErrorKind::ExecuteMemory.into())
|
||||
}
|
||||
|
||||
pub fn get_alloc_kind(&self, id: AllocId) -> Option<MemoryKind<M::MemoryKinds>> {
|
||||
self.alloc_kind.get(&id).cloned()
|
||||
}
|
||||
|
||||
/// For debugging, print an allocation and all allocations it points to, recursively.
|
||||
pub fn dump_alloc(&self, id: AllocId) {
|
||||
self.dump_allocs(vec![id]);
|
||||
|
||||
Reference in New Issue
Block a user