@@ -5,6 +5,7 @@ use crate::{
6use anyhow::anyhow;
6use anyhow::anyhow;
7pub use log::{error, info};
7pub use log::{error, info};
8+use serde::{Deserialize, Serialize};
9 collections::HashMap,
10 collections::HashMap,
10 net::{IpAddr, Ipv4Addr, SocketAddr},
11 net::{IpAddr, Ipv4Addr, SocketAddr},
@@ -20,6 +21,13 @@ use tokio::{
24+// Different workarounds for adapters' differences
25+#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
26+pub struct DebuggerQuirks {
28+ pub absolute_paths: bool,
23#[derive(Debug)]
31#[derive(Debug)]
24pub struct Client {
32pub struct Client {
25 id: usize,
33 id: usize,
@@ -34,6 +42,7 @@ pub struct Client {
34 /// Currently active frame for the current thread.
42 /// Currently active frame for the current thread.
35 pub active_frame: Option<usize>,
43 pub active_frame: Option<usize>,
36 pub breakpoints: Vec<Breakpoint>,
44 pub breakpoints: Vec<Breakpoint>,
45+ pub quirks: DebuggerQuirks,
39impl Client {
48impl Client {
@@ -45,6 +54,9 @@ impl Client {
45 port_arg: Option<String>,
54 port_arg: Option<String>,
46 id: usize,
55 id: usize,
47 ) -> Result<(Self, UnboundedReceiver<Payload>)> {
56 ) -> Result<(Self, UnboundedReceiver<Payload>)> {
58+ return Result::Err(Error::Other(anyhow!("Command not provided")));
48 if transport == "tcp" && port_arg.is_some() {
60 if transport == "tcp" && port_arg.is_some() {
49 Self::tcp_process(
61 Self::tcp_process(
@@ -82,6 +94,7 @@ impl Client {
82 thread_id: None,
94 thread_id: None,
83 active_frame: None,
95 active_frame: None,
84 breakpoints: vec![],
96 breakpoints: vec![],
97+ quirks: DebuggerQuirks::default(),
87 tokio::spawn(Self::recv(server_rx, client_rx));
100 tokio::spawn(Self::recv(server_rx, client_rx));