@@ -79,10 +79,6 @@ impl<T> LimitedBuffer<T> {
79
79
#[ derive( Parser , Debug , Clone , Default ) ]
80
80
#[ command( version, about, long_about = None ) ]
81
81
struct Args {
82
- /// Run gdb as child process
83
- #[ arg( short, long) ]
84
- local : bool ,
85
-
86
82
/// Connect to nc session
87
83
///
88
84
/// `mkfifo gdb_pipe; cat gdb_pipe | gdb --interpreter=mi | nc -l -p 12345 > gdb_pipe`
@@ -179,15 +175,14 @@ struct App {
179
175
impl App {
180
176
/// Create new stream to gdb
181
177
/// - remote: Connect to gdb via a TCP connection
182
- /// - local: Connect to gdb via spawning a gdb process
183
178
///
184
179
///
185
180
/// # Returns
186
181
/// `(gdb_stdin, App)`
187
182
pub fn new_stream ( args : Args ) -> ( BufReader < Box < dyn Read + Send > > , App ) {
188
183
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 => {
191
186
let mut gdb_process = Command :: new ( "gdb" )
192
187
. args ( [ "--interpreter=mi2" , "--quiet" , "-nx" ] )
193
188
. stdin ( Stdio :: piped ( ) )
@@ -203,7 +198,7 @@ impl App {
203
198
204
199
( reader, gdb_stdin)
205
200
}
206
- ( false , Some ( remote) ) => {
201
+ Some ( remote) => {
207
202
let tcp_stream = TcpStream :: connect ( remote) . unwrap ( ) ;
208
203
let reader = BufReader :: new (
209
204
Box :: new ( tcp_stream. try_clone ( ) . unwrap ( ) ) as Box < dyn Read + Send >
0 commit comments