Skip to content

Commit c88e4f2

Browse files
committed
Remove --local
* This didn't allow us anything, so just remove it and do --local by default
1 parent 7c95e54 commit c88e4f2

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/main.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ impl<T> LimitedBuffer<T> {
7979
#[derive(Parser, Debug, Clone, Default)]
8080
#[command(version, about, long_about = None)]
8181
struct Args {
82-
/// Run gdb as child process
83-
#[arg(short, long)]
84-
local: bool,
85-
8682
/// Connect to nc session
8783
///
8884
/// `mkfifo gdb_pipe; cat gdb_pipe | gdb --interpreter=mi | nc -l -p 12345 > gdb_pipe`
@@ -179,15 +175,14 @@ struct App {
179175
impl App {
180176
/// Create new stream to gdb
181177
/// - remote: Connect to gdb via a TCP connection
182-
/// - local: Connect to gdb via spawning a gdb process
183178
///
184179
///
185180
/// # Returns
186181
/// `(gdb_stdin, App)`
187182
pub fn new_stream(args: Args) -> (BufReader<Box<dyn Read + Send>>, App) {
188183
let (reader, gdb_stdin): (BufReader<Box<dyn Read + Send>>, Arc<Mutex<dyn Write + Send>>) =
189-
match (&args.local, &args.remote) {
190-
(true, None) => {
184+
match &args.remote {
185+
None => {
191186
let mut gdb_process = Command::new("gdb")
192187
.args(["--interpreter=mi2", "--quiet", "-nx"])
193188
.stdin(Stdio::piped())
@@ -203,7 +198,7 @@ impl App {
203198

204199
(reader, gdb_stdin)
205200
}
206-
(false, Some(remote)) => {
201+
Some(remote) => {
207202
let tcp_stream = TcpStream::connect(remote).unwrap();
208203
let reader = BufReader::new(
209204
Box::new(tcp_stream.try_clone().unwrap()) as Box<dyn Read + Send>

0 commit comments

Comments
 (0)