| 94 | #[cfg(feature = "debugger")] |
| 95 | impl EventStream { |
| 96 | pub fn breakpoint( |
| 97 | bp_id: crate::BpId, |
| 98 | thread_id: u64, |
| 99 | frame_id: u64, |
| 100 | reason: crate::Reason, |
| 101 | ) -> Bytes { |
| 102 | let mut bytes = Bytes::new(); |
| 103 | bytes.push_byte(b'B'); |
| 104 | bytes.push_byte(match reason { |
| 105 | crate::Reason::Breakpoint => b'B', |
| 106 | crate::Reason::Panic => b'P', |
| 107 | crate::Reason::FutureEnter => b'F', |
| 108 | crate::Reason::FutureExit => b'F', |
| 109 | }); |
| 110 | match reason { |
| 111 | crate::Reason::FutureEnter => bytes.push_byte(b'{'), |
| 112 | crate::Reason::FutureExit => bytes.push_byte(b'}'), |
| 113 | _ => (), |
| 114 | } |
| 115 | bytes.integer(bp_id.0); |
| 116 | bytes.integer(thread_id); |
| 117 | bytes.integer(frame_id); |
| 118 | bytes |
| 119 | } |
| 120 | |
| 121 | pub fn function_call(bp_id: crate::BpId, thread_id: u64, active_frame: &ActiveFrame) -> Bytes { |
| 122 | let mut bytes = Bytes::new(); |