MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / debug_cnc

Function debug_cnc

hail-fuzz/src/debugging/check.rs:187–201  ·  view source on GitHub ↗
(vm: &mut Vm, debug: DebugConfig)

Source from the content-addressed store, hash-verified

185const RIOT_CCN_LITE_RELAY: u64 = binary_id(MULTI_FUZZ_BASE, 1);
186
187fn debug_cnc(vm: &mut Vm, debug: DebugConfig) {
188 if debug.output.is_some() {
189 register_char_out_printer(vm, 0x8007db4, "r0");
190 }
191
192 const SET_SETTINGS_DECIMAL_PLACES: u64 = 0x8004f8a;
193 let reg_r2 = vm.cpu.arch.sleigh.get_varnode("r2").unwrap();
194 let out = debug;
195 vm.hook_address(SET_SETTINGS_DECIMAL_PLACES, move |cpu, _addr| {
196 let value = cpu.read_reg(reg_r2);
197 if value > 9 {
198 out.error(cpu, &format!("settings.decimal_places={value}"), 11);
199 }
200 });
201}
202
203fn debug_gateway(vm: &mut Vm, debug: DebugConfig) {
204 let reg_r0 = vm.cpu.arch.sleigh.get_varnode("r0").unwrap();

Callers 1

initFunction · 0.85

Calls 2

errorMethod · 0.45

Tested by

no test coverage detected