From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 5A7A93858D39 for ; Wed, 4 Jan 2023 14:42:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A7A93858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD4xz-00026p-Q8; Wed, 04 Jan 2023 09:42:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=2SX8dvHkkWJOUzrq8xcje2xUhxXIe7veqttARY5YqCo=; b=HkkNcVD3Ufbc++w1XpEj EIPE6kRMI+tkDKAeMsbXi+BeCdZ9MkjyoJlV6I+1h8Irx9HCO7M6vHU8Bi794yTGJpwDbWWmjeFR9 zFQFGb8P/DBTNjTXvLrns0nflGPrUQ75L72taUJg0bdDQb0ssUJTSrKUtMUYKkIolzL2T1sJak7VD pelH+tqDT9G1Rx731LxMU1oddyTKGRqXjxp2njVcH6LnW5T5+hhlGxIr7HYMaTzYzqmKdIfK4svKV YJgWFhDoYe/LnW5/G2pYQzJa0HGIa4Ifox7B/iYF9RWk2JabdC0CdXNPBlDfvfVSyX+fOxmbUrVKp dOeLnr2EO/napg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD4xx-0001ZI-Tv; Wed, 04 Jan 2023 09:42:06 -0500 Date: Wed, 04 Jan 2023 16:42:19 +0200 Message-Id: <83ilhmz7hw.fsf@gnu.org> From: Eli Zaretskii To: ahajkova@redhat.com Cc: gdb-patches@sourceware.org In-Reply-To: <20230104113909.1395263-1-ahajkova@redhat.com> (=?utf-8?Q?AlexandraH=C3=A1jkov=C3=A1=40sourceware=2Eorg?=) Subject: Re: [PATCH] remote.c: Allow inferior to reply with an error References: <20230104113909.1395263-1-ahajkova@redhat.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > From: AlexandraHájková@sourceware.org > Date: Wed, 4 Jan 2023 12:39:09 +0100 > From: Alexandra Hájková > > When gdb communicates with the inferior with the remote > protocol, the only possible response to the QSetWorkingDir > packet is "OK". If the inferior will reply with anything > else, gdb will complain about the unexpected reply and stop > its communication with the inferior. > > [remote] Sending packet: $QSetWorkingDir:2f746d70#bb > [remote] Packet received: E00 > Remote replied unexpectedly while setting the inferior's working > directory: E00 > (gdb) > > But setting the inferior's working dir is not always possible due > to various reasons and we may not want to always stop the communication. > This patch proposes to just warn the user in a case it wasn't possible > to set the working dir but proceed without an error. > > [remote] Sending packet: $QSetWorkingDir:2f746d70#bb > remote] Packet received: E00 > warning: Remote failed to set the inferior's working directory: E00 > [remote] Sending packet: $vRun;2f7573722f62696e2f6563686f#3d > --- > gdb/doc/gdb.texinfo | 3 +++ > gdb/remote.c | 8 +++----- > 2 files changed, 6 insertions(+), 5 deletions(-) OK for the documentation part. Thanks.