From 2c7b75475f9534ca330cccea4778a3878fed6b4c Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Mon, 30 Aug 2021 10:58:15 +0900 Subject: dap: refactor frame handling --- helix-dap/src/client.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'helix-dap') 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, // pub breakpoints: HashMap>, - // TODO: multiple threads support - pub stack_pointer: Option, + // thread_id -> frames + pub stack_frames: HashMap>, pub thread_id: Option, - pub is_running: bool, + /// Currently active frame for the current thread. + pub active_frame: Option, + 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, }; -- cgit v1.2.3-70-g09d2