| 443 | } |
| 444 | |
| 445 | fn debug_xml_parser(vm: &mut Vm, debug: DebugConfig) { |
| 446 | let mut hook_injected_bug = move |addr: u64, msg: &'static str, code: u64| { |
| 447 | let out = debug.clone(); |
| 448 | vm.hook_address(addr, move |cpu, _| out.error(cpu, msg, code)); |
| 449 | }; |
| 450 | |
| 451 | hook_injected_bug(0x800b55a, "Hit double free", 32); |
| 452 | hook_injected_bug(0x800b682, "Hit stack based buffer overflow", 33); |
| 453 | hook_injected_bug(0x800b6ba, "Null pointer dereference hit", 34); |
| 454 | hook_injected_bug(0x800b6cc, "Format-string vulnerability hit", 35); |
| 455 | hook_injected_bug(0x800b6a4, "Hit heap based buffer overflow", bug(XML_PARSER, 6)); |
| 456 | } |
| 457 | |
| 458 | fn debug_lowpan(vm: &mut Vm, debug: DebugConfig) { |
| 459 | if debug.output.is_some() { |