mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-31 15:01:03 +00:00
Print the last frame in block trace output.
This commit is contained in:
parent
2e532fa66d
commit
e5f7dc8274
@ -34,8 +34,16 @@ impl FunctionMiddleware for BlockTrace {
|
|||||||
let evt_idx = self.evt_idx;
|
let evt_idx = self.evt_idx;
|
||||||
sink.push(op);
|
sink.push(op);
|
||||||
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
||||||
move |_| {
|
move |info| {
|
||||||
eprintln!("[BlockTrace] ({}, {}) -> enter_func", func_idx, evt_idx);
|
eprintln!(
|
||||||
|
"[BlockTrace] ({}, {}) -> enter_func % {:?}",
|
||||||
|
func_idx,
|
||||||
|
evt_idx,
|
||||||
|
info.fault
|
||||||
|
.and_then(|x| unsafe { x.read_stack(Some(1)) })
|
||||||
|
.unwrap()
|
||||||
|
.frames[0]
|
||||||
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
))))
|
))))
|
||||||
@ -45,8 +53,16 @@ impl FunctionMiddleware for BlockTrace {
|
|||||||
let evt_idx = self.evt_idx;
|
let evt_idx = self.evt_idx;
|
||||||
sink.push(op);
|
sink.push(op);
|
||||||
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
||||||
move |_| {
|
move |info| {
|
||||||
eprintln!("[BlockTrace] ({}, {}) -> leave_call", func_idx, evt_idx);
|
eprintln!(
|
||||||
|
"[BlockTrace] ({}, {}) -> leave_call % {:?}",
|
||||||
|
func_idx,
|
||||||
|
evt_idx,
|
||||||
|
info.fault
|
||||||
|
.and_then(|x| unsafe { x.read_stack(Some(1)) })
|
||||||
|
.unwrap()
|
||||||
|
.frames[0]
|
||||||
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
))))
|
))))
|
||||||
@ -56,8 +72,16 @@ impl FunctionMiddleware for BlockTrace {
|
|||||||
let evt_idx = self.evt_idx;
|
let evt_idx = self.evt_idx;
|
||||||
sink.push(op);
|
sink.push(op);
|
||||||
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
||||||
move |_| {
|
move |info| {
|
||||||
eprintln!("[BlockTrace] ({}, {}) -> block", func_idx, evt_idx);
|
eprintln!(
|
||||||
|
"[BlockTrace] ({}, {}) -> block % {:?}",
|
||||||
|
func_idx,
|
||||||
|
evt_idx,
|
||||||
|
info.fault
|
||||||
|
.and_then(|x| unsafe { x.read_stack(Some(1)) })
|
||||||
|
.unwrap()
|
||||||
|
.frames[0]
|
||||||
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
))))
|
))))
|
||||||
@ -67,8 +91,16 @@ impl FunctionMiddleware for BlockTrace {
|
|||||||
let evt_idx = self.evt_idx;
|
let evt_idx = self.evt_idx;
|
||||||
sink.push(op);
|
sink.push(op);
|
||||||
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
||||||
move |_| {
|
move |info| {
|
||||||
eprintln!("[BlockTrace] ({}, {}) -> loop", func_idx, evt_idx);
|
eprintln!(
|
||||||
|
"[BlockTrace] ({}, {}) -> loop % {:?}",
|
||||||
|
func_idx,
|
||||||
|
evt_idx,
|
||||||
|
info.fault
|
||||||
|
.and_then(|x| unsafe { x.read_stack(Some(1)) })
|
||||||
|
.unwrap()
|
||||||
|
.frames[0]
|
||||||
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
))))
|
))))
|
||||||
@ -78,8 +110,16 @@ impl FunctionMiddleware for BlockTrace {
|
|||||||
let evt_idx = self.evt_idx;
|
let evt_idx = self.evt_idx;
|
||||||
sink.push(op);
|
sink.push(op);
|
||||||
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
||||||
move |_| {
|
move |info| {
|
||||||
eprintln!("[BlockTrace] ({}, {}) -> if", func_idx, evt_idx);
|
eprintln!(
|
||||||
|
"[BlockTrace] ({}, {}) -> if % {:?}",
|
||||||
|
func_idx,
|
||||||
|
evt_idx,
|
||||||
|
info.fault
|
||||||
|
.and_then(|x| unsafe { x.read_stack(Some(1)) })
|
||||||
|
.unwrap()
|
||||||
|
.frames[0]
|
||||||
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
))))
|
))))
|
||||||
@ -89,8 +129,16 @@ impl FunctionMiddleware for BlockTrace {
|
|||||||
let evt_idx = self.evt_idx;
|
let evt_idx = self.evt_idx;
|
||||||
sink.push(op);
|
sink.push(op);
|
||||||
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
||||||
move |_| {
|
move |info| {
|
||||||
eprintln!("[BlockTrace] ({}, {}) -> else", func_idx, evt_idx);
|
eprintln!(
|
||||||
|
"[BlockTrace] ({}, {}) -> else % {:?}",
|
||||||
|
func_idx,
|
||||||
|
evt_idx,
|
||||||
|
info.fault
|
||||||
|
.and_then(|x| unsafe { x.read_stack(Some(1)) })
|
||||||
|
.unwrap()
|
||||||
|
.frames[0]
|
||||||
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
))))
|
))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user