Add option to create qemu debug logs
This commit is contained in:
parent
96f0e4512b
commit
27d379486b
@ -247,6 +247,9 @@ pub struct RuntimeConfig {
|
||||
|
||||
/* aux_buffer size */
|
||||
aux_buffer_size: usize,
|
||||
|
||||
/* The path to which nyx logs will be written to from QEMU-Nyx (requires debug mode in QEMU-Nyx) */
|
||||
nyx_debug_log_path: Option<String>
|
||||
}
|
||||
|
||||
impl RuntimeConfig{
|
||||
@ -258,6 +261,7 @@ impl RuntimeConfig{
|
||||
debug_mode: false,
|
||||
worker_id: 0,
|
||||
aux_buffer_size: DEFAULT_AUX_BUFFER_SIZE,
|
||||
nyx_debug_log_path: None
|
||||
}
|
||||
}
|
||||
|
||||
@ -322,6 +326,14 @@ impl RuntimeConfig{
|
||||
self.aux_buffer_size
|
||||
}
|
||||
|
||||
pub fn set_nyx_debug_log_path(&mut self, path: String) {
|
||||
self.nyx_debug_log_path = Some(path);
|
||||
}
|
||||
|
||||
pub fn nyx_debug_log_path(&self) -> Option<&str> {
|
||||
self.nyx_debug_log_path.as_deref()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
@ -122,6 +122,12 @@ impl QemuParams {
|
||||
cmd.push("-cpu".to_string());
|
||||
cmd.push("kAFL64-Hypervisor-v1".to_string());
|
||||
|
||||
if let Some(nyx_debug_log_path) = fuzzer_config.runtime.nyx_debug_log_path() {
|
||||
cmd.push("-D".to_string());
|
||||
cmd.push(nyx_debug_log_path.to_string());
|
||||
cmd.push("-d".to_string());
|
||||
cmd.push("nyx".to_string());
|
||||
}
|
||||
|
||||
if fuzzer_config.runtime.reuse_root_snapshot_path().is_some() {
|
||||
cmd.push("-fast_vm_reload".to_string());
|
||||
|
Loading…
x
Reference in New Issue
Block a user