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 930BE3858C39 for ; Fri, 13 Jan 2023 13:16:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 930BE3858C39 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 1pGJuf-0007bA-VE; Fri, 13 Jan 2023 08:16:05 -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=MDsuvQSW3HgeLeJyvcCa6wVlJHIgVRaygmv+Bi9gFo8=; b=Dm1J80ufYqvk490n+vDj VpgOfBtgXkX0wxwIfvzPPDU/ngWCirE8HfKYg2naexYb1yGYqF+z8htWhnKIs87LxsdcojehCp1nb pS8Xlblm0guhpzZmPkznAxeRK7trQ5eIF9MUoJsawHJcWbDslGuyjkV7/BjEFw7m832iOxemdKHIW 8v27nxZiEZ8hVbodYJO8P8n7oCcxP/NEcDHVNUPkGmLF4uoO3Qp3xE4m74HbGNW+H+3V7VPggx2Kp RwPln9KpK+cUT0NL4+Oq2dq0vA4lh4pZAApbhoZDqZmryyjuw9d9myo3CvgghKCSYmq3w2EreWfuD Cu/gjaO5DqHubQ==; 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 1pGJud-0008Oh-98; Fri, 13 Jan 2023 08:16:04 -0500 Date: Fri, 13 Jan 2023 15:16:04 +0200 Message-Id: <83fscea82z.fsf@gnu.org> From: Eli Zaretskii To: Alexandra =?utf-8?B?SMOhamtvdsOh?= Cc: gdb-patches@sourceware.org In-Reply-To: <20230113115910.3215524-1-ahajkova@redhat.com> (=?utf-8?Q?AlexandraH=C3=A1jkov=C3=A1=40sourceware=2Eorg?=) Subject: Re: [PATCH v2] remote.c: Allow inferior to reply with an error References: <20230113115910.3215524-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: Fri, 13 Jan 2023 12:59:10 +0100 > > From: Alexandra Hájková > > When gdb communicates with some kind of gdbserver or gdbserver > stub over the remote protocol, the only possible response to > the QSetWorkingDir packet is "OK". If the remote will reply > with anything else, gdb will complain about the unexpected reply. > > [remote] Sending packet: $QSetWorkingDir:2f746d70#bb > [remote] Packet received: E00 > Remote replied unexpectedly while setting the inferior's working > directory: E00 > (gdb) > > Allow remote to send an error message over as a QSetWorkingDir > packet reply. > > [remote] Sending packet: $QSetWorkingDir:2f746d70#bb > [remote] Packet received: E.directory does not exist > Remote failed to set working directory: directory does not exist. > > --- > V2 does not change the behaviour of gdb in a case it wasn't possible to > set the inferior's working directory. It just allows to pass the error > message to gdb. > > gdb/doc/gdb.texinfo | 3 +++ > gdb/remote.c | 12 +++++++++--- > 2 files changed, 12 insertions(+), 3 deletions(-) OK for the documentation part. Thanks.