From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id uG9YOCDCbWURKBcAWB0awg (envelope-from ) for ; Mon, 04 Dec 2023 07:12:16 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IlYNhq3+; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D948F1E0C0; Mon, 4 Dec 2023 07:12:16 -0500 (EST) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C5A651E00F for ; Mon, 4 Dec 2023 07:12:14 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5B13A3857B93 for ; Mon, 4 Dec 2023 12:12:14 +0000 (GMT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id D0C603858C5E for ; Mon, 4 Dec 2023 12:11:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D0C603858C5E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D0C603858C5E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701691925; cv=none; b=g4qJpV2lUuWmQXehdXke6FHEgLZoJhAovmbl1zYBqgY+VqFcz2q0PvQU00S9lKfzv2N/YCTYbAA6duEaExbEOZ24K9VckhaoO+/rqFIa8Uh8T7D7lTasVMeXa1q4F6hfmrDHSa7HB3jMkZi25q4lNAGWamfQONkekAc92OYC1Ls= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701691925; c=relaxed/simple; bh=1feQd6WjFkhow/WAcZ+wkIu3I+SuBi4YeUSCwAhO7yk=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=fgMkhuZEZsZ69TkgQAlIbwUDHNlnAhDpmQ66YrFIGY5mER+i5miqArN4OBkhtMeF3hU4n+9yKEykJHCw5ysQmSTPN7L6gVGTcSVDoAx2JqQzqKzA06HsHeVAKs9FEwIe4daNeoA3NedvNpX/UeGNiHCZpjOHUWDlLYM2dfBOyRI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701691915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Pkq1RnH4LeZkU6Aw2MfFdK3HzHMzyhvI+iMmWU5xBSo=; b=IlYNhq3+k5fL/xnEj/lHCmVExZgYCiKj5YqT8HO2EPPhIPzDVGvygKN30ZwTqKsEtwhCDi tpaeO5UbNw+SIj8OdVdEtj1vYWPZG5wMB7IIS8QtpHr1rvGlnFl3ya/+Zz6E07o9ziv0vs Yy8HjY5kmPbVdjIfvczN/07STm6pBVg= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-uRamJMVtPUqHPde9vIQFXg-1; Mon, 04 Dec 2023 07:11:53 -0500 X-MC-Unique: uRamJMVtPUqHPde9vIQFXg-1 Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-2869cdac540so577502a91.0 for ; Mon, 04 Dec 2023 04:11:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701691912; x=1702296712; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Pkq1RnH4LeZkU6Aw2MfFdK3HzHMzyhvI+iMmWU5xBSo=; b=mMY0eFvBs9NLo43eMIDxyWU+PnZpzcGtIiDBV2BWvPIHkUM71ff4wYnAYx3R4G1Gb3 Eq6lshGhJdgfzAdGQQHND7jY+gZ2bcYFaeU8cV5S73dnfboTuB+klRsjOWMP2pwfdpOt vsIuCm4697AwSZY4mIZa+NZknqLic7MB7CFqY0TsH9U0dl8UHf8NPwsfQtEKhs4b/lTt DvvFWaaNod59jQlaTFltOk9hrSKdGi0YeVV3NZIXkZ8M1tjucUyUo5DgPKcOvSfsrXCs byK7GxxrgDOtUX8qD0CXI+af9kYVWpBE04LydWWr0kMBrzkPSUJCRFv2F37Rmbzddmx8 Rqwg== X-Gm-Message-State: AOJu0YwZddYq8P5S1vQ9549k9Yk6nOnlKSHzTGQdYAYvnnMGIALjn9MD bpd0Jz77nG8Rru4QhaxX/cdzV2BEh80IRJ46uAPbUwc7VbS7XnBItcgTIwJbUSL2GVmh1yNdsP8 vvBpqxZM837V6fPnrpJI33+uhbiZz8b8C/fiMstJ9qhrppPBh X-Received: by 2002:a17:90a:d3d6:b0:286:6cc0:b914 with SMTP id d22-20020a17090ad3d600b002866cc0b914mr1033003pjw.75.1701691912253; Mon, 04 Dec 2023 04:11:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcYWHWRGI7FUJQV1BsaD96tkt3h7nPx9ZZsxtQWg6uY1DBwvPaSjl+JvsAwwykSHr/fB5kgF90I2yDnnb3zmI= X-Received: by 2002:a17:90a:d3d6:b0:286:6cc0:b914 with SMTP id d22-20020a17090ad3d600b002866cc0b914mr1032996pjw.75.1701691911998; Mon, 04 Dec 2023 04:11:51 -0800 (PST) MIME-Version: 1.0 References: <20231117111840.2040709-1-ahajkova@redhat.com> <874jh1brln.fsf@tromey.com> In-Reply-To: <874jh1brln.fsf@tromey.com> From: Alexandra Petlanova Hajkova Date: Mon, 4 Dec 2023 13:11:41 +0100 Message-ID: Subject: Re: [PATCH 0/6] Add vDefaultInferiorFd feature To: Tom Tromey Cc: gdb-patches@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000eeab6b060bae0513" X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_WEB, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org --000000000000eeab6b060bae0513 Content-Type: text/plain; charset="UTF-8" > > Alexandra> Add a new DefaultInferiorFd feature and the corresponding > packet. > > One question I had is - why a new packet? A new packet seems somewhat > weird, in that it's only valid pretty early during startup, it seems. > > Another approach might be to have a different way to specify the > connection fd to the remote, like a command-line option naming the fd to > use for RSP traffic. > Are you imagining something like "target remote | gdbserver --once RSP_FD ...." ? And GDB would replace RSP_FD with the actual file descriptor to use? I agree that's a good idea but both approaches have pros and cons. You are correct that a command line approach is better because it avoids adding a new packet and the whole FD switching business. But adding the new packet approach makes it easier for the users. It's possible to run GDB to then run Valgrind from inside by using simply target extended-remote | vgdb --multi I hope this command will be replaced with an even simpler " target valgrind" at some point. If we wanted to use the feature with GDBserver, I think, it's always more user-friendly when the user does not have to set any additional command-line options. Thanks, Alexandra --000000000000eeab6b060bae0513 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Alexandra> Add a new DefaultInferiorFd feature and the corresponding pac= ket.

One question I had is - why a new packet?=C2=A0 A new packet seems somewhat=
weird, in that it's only valid pretty early during startup, it seems.
Another approach might be to have a different way to specify the
connection fd to the remote, like a command-line option naming the fd to use for RSP traffic.

Are you imagining something like "target remote | gdbserver --once RSP_FD .= ..." ?
And GDB would replace RSP_FD with the actual file descriptor to use?
I agree that's a good idea but both=C2=A0 approaches have pros and co= ns.
You are correct that a command line approach is better becaus= e it
avoids adding a new packet and the whole FD switching busine= ss. But adding the new=C2=A0
packet approach makes it easier for = the users. It's possible to run GDB to then run
=C2=A0Valgrin= d from inside by using simply

target extended-remo= te | vgdb --multi

I hope this command will be repl= aced with an even simpler " target valgrind" at
some po= int.
If we wanted to use the feature with GDBserver, I think, it&= #39;s always more user-friendly
=C2=A0when the user does not have= to set any additional command-line options.

Thank= s,
Alexandra

--000000000000eeab6b060bae0513--