Skip to content

Commit 9aebaba

Browse files
committed
Change mlogv32 debug flag behaviour
1 parent a16c378 commit 9aebaba

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/bin/mlogv32.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ struct Cli {
3030
#[arg(long)]
3131
bin: Option<PathBuf>,
3232

33-
/// Enable debugging features.
33+
/// Enable single-stepping mode when the processor starts
3434
#[arg(long)]
35-
debug: bool,
35+
step: bool,
3636
}
3737

3838
#[derive(Deserialize)]
@@ -205,7 +205,7 @@ fn main() -> Result<(), Box<dyn Error>> {
205205
*enabled = true;
206206
}
207207
if let BuildingData::Switch(enabled) = &mut *single_step_switch.data.borrow_mut() {
208-
*enabled = cli.debug;
208+
*enabled = cli.step;
209209
}
210210

211211
let mut ticks = 0;
@@ -218,8 +218,7 @@ fn main() -> Result<(), Box<dyn Error>> {
218218
ticks += 1;
219219
now = Instant::now();
220220

221-
if cli.debug
222-
&& let BuildingData::Switch(paused) = &mut *pause_switch.data.borrow_mut()
221+
if let BuildingData::Switch(paused) = &mut *pause_switch.data.borrow_mut()
223222
&& *paused
224223
&& let BuildingData::Switch(single_step) = &mut *single_step_switch.data.borrow_mut()
225224
&& let BuildingData::Processor(ctrl) = &*controller.data.borrow()

0 commit comments

Comments
 (0)