aboutsummaryrefslogtreecommitdiff
path: root/helix-dap
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-08-30 01:58:15 +0000
committerBlaž Hrastnik2021-08-30 02:07:59 +0000
commit2c7b75475f9534ca330cccea4778a3878fed6b4c (patch)
tree4cab34a9a54bd86b816b14ce8832cf42158a44bd /helix-dap
parent986828e75c17662da39505c7190220b8c352bc8a (diff)
dap: refactor frame handling
Diffstat (limited to 'helix-dap')
-rw-r--r--helix-dap/src/client.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index b0e43154..72f7e12c 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -29,10 +29,12 @@ pub struct Client {
pub caps: Option<DebuggerCapabilities>,
//
pub breakpoints: HashMap<PathBuf, Vec<SourceBreakpoint>>,
- // TODO: multiple threads support
- pub stack_pointer: Option<StackFrame>,
+ // thread_id -> frames
+ pub stack_frames: HashMap<usize, Vec<StackFrame>>,
pub thread_id: Option<usize>,
- pub is_running: bool,
+ /// Currently active frame for the current thread.
+ pub active_frame: Option<usize>,
+ pub is_running: bool, // TODO: track is_running per thread
}
impl Client {
@@ -76,8 +78,9 @@ impl Client {
caps: None,
//
breakpoints: HashMap::new(),
- stack_pointer: None,
+ stack_frames: HashMap::new(),
thread_id: None,
+ active_frame: None,
is_running: false,
};