Skip to content

Commit 4877461

Browse files
committed
chore: add support for rustc 1.81 (close #42)
1 parent 6a438c3 commit 4877461

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

src/debugger/variable/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,8 @@ impl<'a> VariableParser<'a> {
13951395
rust_version,
13961396
(1, 0, 0) ..= (1, 76, u32::MAX) => type_ns_h.contains(&["std", "sys", "common", "thread_local", "fast_local"]),
13971397
(1, 77, 0) ..= (1, 77, u32::MAX) => type_ns_h.contains(&["std", "sys", "pal", "common", "thread_local", "fast_local"]),
1398-
(1, 78, 0) ..= (1, u32::MAX, u32::MAX) => type_ns_h.contains(&["std", "sys", "thread_local", "fast_local"]),
1398+
(1, 78, 0) ..= (1, 80, u32::MAX) => type_ns_h.contains(&["std", "sys", "thread_local", "fast_local"]),
1399+
(1, 81, 0) ..= (1, u32::MAX, u32::MAX) => type_ns_h.contains(&["std", "sys", "thread_local"]),
13991400
);
14001401
if is_tls_type == Some(true) {
14011402
return version_switch!(

src/version.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ static SUPPORTED_RUSTC: &[(Version, Version)] = &[
5757
(Version((1, 78, 0)), Version((1, 78, u32::MAX))),
5858
(Version((1, 79, 0)), Version((1, 79, u32::MAX))),
5959
(Version((1, 80, 0)), Version((1, 80, u32::MAX))),
60+
(Version((1, 81, 0)), Version((1, 81, u32::MAX))),
6061
];
6162

6263
pub fn supported_versions_to_string() -> String {

tests/debugger/steps.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
use crate::common::TestHooks;
21
use crate::common::TestInfo;
2+
use crate::common::{rust_version, TestHooks};
33
use crate::CALC_APP;
44
use crate::{assert_no_proc, prepare_debugee_process, HW_APP, RECURSION_APP, VARS_APP};
55
use bugstalker::debugger::variable::{SupportedScalar, VariableIR};
66
use bugstalker::debugger::{Debugger, DebuggerBuilder};
77
use bugstalker::ui::command::parser::expression;
8+
use bugstalker::version_switch;
89
use chumsky::Parser;
910
use serial_test::serial;
1011
use std::mem;
@@ -107,6 +108,15 @@ fn test_step_out() {
107108
debugger.step_into().unwrap();
108109
debugger.step_into().unwrap();
109110
debugger.step_into().unwrap();
111+
let rust_version = rust_version(HW_APP).unwrap();
112+
version_switch!(
113+
rust_version,
114+
(1, 0, 0) ..= (1, 80, u32::MAX) => {},
115+
(1, 81, 0) ..= (1, u32::MAX, u32::MAX) => {
116+
debugger.step_into().unwrap();
117+
},
118+
);
119+
110120
assert_eq!(info.line.take(), Some(15));
111121

112122
debugger.step_out().unwrap();

tests/integration/test_sharedlib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def test_dynamic_load_lib_step(self):
7676
self.debugger.cmd('step')
7777
self.debugger.cmd('step')
7878
self.debugger.cmd('step')
79+
self.debugger.cmd('step')
7980
self.debugger.cmd('step', '3 println!("sum is {num}")')
8081

8182
def test_deferred_breakpoint(self):

tests/integration/test_watchpoint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ def test_watchpoint_with_stepping(self):
6969
self.debugger.cmd('watch int8', 'New watchpoint')
7070
self.debugger.cmd('next', 'Hit watchpoint')
7171
self.debugger.cmd('next', '13 println!("{int8}");')
72+
self.debugger.cmd('next')
73+
self.debugger.cmd('next')
7274
self.debugger.cmd('next', 'Watchpoint 1 end of scope')
73-
self.debugger.cmd('next', '109 calculation_four_value();')
7475

7576
def test_watchpoint_at_undefined_value(self):
7677
"""Trying to set watchpoint for undefined value"""

0 commit comments

Comments
 (0)