MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / redacted

Method redacted

protocol/src/event.rs:64–103  ·  view source on GitHub ↗

Redact the memory address of all values. Intended for testing.

(&mut self)

Source from the content-addressed store, hash-verified

62
63 /// Redact the memory address of all values. Intended for testing.
64 pub fn redacted(&mut self) {
65 match self {
66 Event::Breakpoint {
67 breakpoint_id,
68 thread_id,
69 locals,
70 ..
71 } => {
72 *breakpoint_id = u32::MAX;
73 *thread_id = u64::MAX;
74 for (_, ref mut local) in locals.iter_mut() {
75 local.redact_addr();
76 }
77 }
78 Event::FunctionCall {
79 breakpoint_id,
80 thread_id,
81 stack_pointer,
82 arguments,
83 ..
84 } => {
85 *breakpoint_id = u32::MAX;
86 *thread_id = u64::MAX;
87 *stack_pointer = u64::MAX;
88 for (_, ref mut argument) in arguments.iter_mut() {
89 argument.redact_addr();
90 }
91 }
92 Event::FunctionReturn {
93 breakpoint_id,
94 thread_id,
95 return_value,
96 ..
97 } => {
98 *breakpoint_id = u32::MAX;
99 *thread_id = u64::MAX;
100 return_value.redact_addr();
101 }
102 }
103 }
104}

Callers

nothing calls this directly

Calls 1

redact_addrMethod · 0.80

Tested by

no test coverage detected