mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-07-31 22:31:59 +00:00
Debugging for store
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use std::u32;
|
||||
use std::ops::Range;
|
||||
use std::cmp;
|
||||
use std::fmt;
|
||||
use parking_lot::RwLock;
|
||||
use elements::{MemoryType, ResizableLimits};
|
||||
use interpreter::Error;
|
||||
@@ -21,6 +22,16 @@ pub struct MemoryInstance {
|
||||
maximum_size: u32,
|
||||
}
|
||||
|
||||
impl fmt::Debug for MemoryInstance {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("MemoryInstance")
|
||||
.field("limits", &self.limits)
|
||||
.field("buffer.len", &self.buffer.read().len())
|
||||
.field("maximum_size", &self.maximum_size)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
struct CheckedRegion<'a, B: 'a> where B: ::std::ops::Deref<Target=Vec<u8>> {
|
||||
buffer: &'a B,
|
||||
offset: usize,
|
||||
|
Reference in New Issue
Block a user