Skip to content

Commit

Permalink
chore: add support for rustc 1.81 (close #42)
Browse files Browse the repository at this point in the history
  • Loading branch information
godzie44 committed Sep 8, 2024
1 parent 6a438c3 commit 604a7ad
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/debugger/variable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,8 @@ impl<'a> VariableParser<'a> {
rust_version,
(1, 0, 0) ..= (1, 76, u32::MAX) => type_ns_h.contains(&["std", "sys", "common", "thread_local", "fast_local"]),
(1, 77, 0) ..= (1, 77, u32::MAX) => type_ns_h.contains(&["std", "sys", "pal", "common", "thread_local", "fast_local"]),
(1, 78, 0) ..= (1, u32::MAX, u32::MAX) => type_ns_h.contains(&["std", "sys", "thread_local", "fast_local"]),
(1, 78, 0) ..= (1, 80, u32::MAX) => type_ns_h.contains(&["std", "sys", "thread_local", "fast_local"]),
(1, 81, 0) ..= (1, u32::MAX, u32::MAX) => type_ns_h.contains(&["std", "sys", "thread_local"]),
);
if is_tls_type == Some(true) {
return version_switch!(
Expand Down
1 change: 1 addition & 0 deletions src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ static SUPPORTED_RUSTC: &[(Version, Version)] = &[
(Version((1, 78, 0)), Version((1, 78, u32::MAX))),
(Version((1, 79, 0)), Version((1, 79, u32::MAX))),
(Version((1, 80, 0)), Version((1, 80, u32::MAX))),
(Version((1, 81, 0)), Version((1, 81, u32::MAX))),
];

pub fn supported_versions_to_string() -> String {
Expand Down
12 changes: 11 additions & 1 deletion tests/debugger/steps.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use crate::common::TestHooks;
use crate::common::TestInfo;
use crate::common::{rust_version, TestHooks};
use crate::CALC_APP;
use crate::{assert_no_proc, prepare_debugee_process, HW_APP, RECURSION_APP, VARS_APP};
use bugstalker::debugger::variable::{SupportedScalar, VariableIR};
use bugstalker::debugger::{Debugger, DebuggerBuilder};
use bugstalker::ui::command::parser::expression;
use bugstalker::version_switch;
use chumsky::Parser;
use serial_test::serial;
use std::mem;
Expand Down Expand Up @@ -107,6 +108,15 @@ fn test_step_out() {
debugger.step_into().unwrap();
debugger.step_into().unwrap();
debugger.step_into().unwrap();
let rust_version = rust_version(HW_APP).unwrap();
version_switch!(
rust_version,
(1, 0, 0) ..= (1, 80, u32::MAX) => {},
(1, 81, 0) ..= (1, u32::MAX, u32::MAX) => {
debugger.step_into().unwrap();
},
);

assert_eq!(info.line.take(), Some(15));

debugger.step_out().unwrap();
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_sharedlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def test_dynamic_load_lib_step(self):
self.debugger.cmd('step')
self.debugger.cmd('step')
self.debugger.cmd('step')
self.debugger.cmd('step')
self.debugger.cmd('step', '3 println!("sum is {num}")')

def test_deferred_breakpoint(self):
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_watchpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ def test_watchpoint_with_stepping(self):
self.debugger.cmd('watch int8', 'New watchpoint')
self.debugger.cmd('next', 'Hit watchpoint')
self.debugger.cmd('next', '13 println!("{int8}");')
self.debugger.cmd('next')
self.debugger.cmd('next')
self.debugger.cmd('next', 'Watchpoint 1 end of scope')
self.debugger.cmd('next', '109 calculation_four_value();')

def test_watchpoint_at_undefined_value(self):
"""Trying to set watchpoint for undefined value"""
Expand Down

0 comments on commit 604a7ad

Please sign in to comment.