Skip to content

Commit f5f59e5

Browse files
committed
revert StepOverLine
1 parent 76fe888 commit f5f59e5

1 file changed

Lines changed: 1 addition & 30 deletions

File tree

  • third_party/move/move-vm/runtime/src/debug

third_party/move/move-vm/runtime/src/debug/mod.rs

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Parts of the file are Copyright (c) Aptos Foundation
44
// All Aptos Foundation code and content is licensed pursuant to the Innovation-Enabling Source Code License, available at https://github.com/aptos-labs/aptos-core/blob/main/LICENSE
55

6-
use crate::{source_locator, LoadedFunction, RuntimeEnvironment};
6+
use crate::{LoadedFunction, RuntimeEnvironment};
77
use move_vm_types::{instr::Instruction, values::Locals};
88
use std::collections::BTreeSet;
99

@@ -25,11 +25,6 @@ pub struct DebugContext {
2525
#[derive(Debug)]
2626
#[allow(unused)]
2727
enum DebuggerOp {
28-
/// keep running until we're back at the same or shallower stack depth AND on a different source line
29-
StepOverLine {
30-
stack_depth: usize,
31-
start_source_loc: Option<String>,
32-
},
3328
/// pause after n more bytecode instructions
3429
StepRemaining(usize),
3530
/// like `StepRemaining` but only counts instructions at the same or shallower depth
@@ -55,9 +50,6 @@ impl DebugContext {
5550
) {
5651
let instr_string = format!("{:?}", instr);
5752
let function_string = function.name_as_pretty_string();
58-
let current_sloc = function.module_id().and_then(|mid| {
59-
source_locator::get_bytecode_source_location(mid, function.index(), pc)
60-
});
6153

6254
let function_string_with_pc = format!("{}::{}", function_string, pc);
6355
let breakpoint_hit = self.breakpoints.iter().any(|bp| {
@@ -74,27 +66,6 @@ impl DebugContext {
7466
false
7567
}
7668
},
77-
DebuggerOp::StepOverLine {
78-
stack_depth,
79-
start_source_loc,
80-
} => {
81-
let current_depth = interpreter.get_stack_depth();
82-
if *stack_depth >= current_depth {
83-
let line_changed = match (&current_sloc, &*start_source_loc) {
84-
(Some(cur), Some(start)) => cur != start,
85-
(Some(_), None) => true,
86-
_ => false,
87-
};
88-
if line_changed {
89-
self.current_op = DebuggerOp::Continue;
90-
true
91-
} else {
92-
false
93-
}
94-
} else {
95-
false
96-
}
97-
},
9869
DebuggerOp::StepOverRemaining {
9970
stack_depth,
10071
remaining,

0 commit comments

Comments
 (0)