Skip to content

Commit c209952

Browse files
authored
Feat: debug exception stop reason (#297)
1 parent 8bc2dcc commit c209952

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/haps/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ impl Tsffs {
427427

428428
let (exit_kind, iteration_count) = match kind {
429429
SolutionKind::Timeout => (ExitKind::Timeout, IterationCount::Timeout),
430-
SolutionKind::Exception | SolutionKind::Breakpoint | SolutionKind::Manual => {
431-
(ExitKind::Crash, IterationCount::Solution)
432-
}
430+
SolutionKind::Exception { .. }
431+
| SolutionKind::Breakpoint { .. }
432+
| SolutionKind::Manual => (ExitKind::Crash, IterationCount::Solution),
433433
};
434434

435435
// Solution/timeout path: classify exit kind and increment corresponding counters.
@@ -547,7 +547,7 @@ impl Tsffs {
547547
pub fn on_exception(&mut self, _obj: *mut ConfObject, exception: i64) -> Result<()> {
548548
if self.all_exceptions_are_solutions || self.exceptions.contains(&exception) {
549549
self.stop_simulation(StopReason::Solution {
550-
kind: SolutionKind::Exception,
550+
kind: SolutionKind::Exception { number: exception },
551551
})?;
552552
}
553553
Ok(())
@@ -571,7 +571,7 @@ impl Tsffs {
571571
);
572572

573573
self.stop_simulation(StopReason::Solution {
574-
kind: SolutionKind::Breakpoint,
574+
kind: SolutionKind::Breakpoint { number: breakpoint },
575575
})?;
576576
}
577577
Ok(())

src/state/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ pub(crate) use policy::SnapshotRestorePolicy;
2121
#[derive(Serialize, Deserialize, Debug, Clone)]
2222
pub(crate) enum SolutionKind {
2323
Timeout,
24-
Exception,
25-
Breakpoint,
24+
Exception { number: i64 },
25+
Breakpoint { number: i64 },
2626
Manual,
2727
}
2828

0 commit comments

Comments
 (0)