From patchwork Fri Apr 19 15:13:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 88743 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ED48C3846047 for ; Fri, 19 Apr 2024 15:15:10 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by sourceware.org (Postfix) with ESMTPS id E91D8384770C for ; Fri, 19 Apr 2024 15:13:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E91D8384770C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E91D8384770C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.221.43 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713539638; cv=none; b=XadMBryJWNjGZYjD07CKVfX7N4wFoLVjkl/Q6zxE179sugdMQDHBhspX90KJbFvbcYCfyiu2GXn+2hQyzDSq6YWY076ii8D9AVembG2SsX9/TGt3UNjtvq/rSHlYEONhL3TQbLNXNTQXZoa8yKQe0IIlQw3M5+qJRS7/Pb8uhvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713539638; c=relaxed/simple; bh=+dkL37xZgHBzL6HR+5CW/a3vc1EbSXGOisyS5QAsSgg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ayWbyk//GduOWNI2Vwz0UU77IiSnS0MyFTOXCNF6dATWf2dfIwJuZoMIYcVLsQhMTCZCakRa9m3wcG+d0T21+52Vzd7eiIGMtFtZRc51DmHhcYuUbRghYCibou2e+LI4Pu9D6pCvB2YOLW6GjrxmHWNgV7oZBUe5SvgC3H3OezE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-34a4772d5easo1126521f8f.0 for ; Fri, 19 Apr 2024 08:13:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713539633; x=1714144433; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qCTT64AE7sBnHcx2g78LO92xgnuMazuTpwsopG6b9BQ=; b=mx7WljH/vfLLRrxyn460FvLFs16TWAzaa0kwxqi8/mqnwzYeBhNwM1i9532RtV4sWR /hMNoQf8PwMX3NgWHH/Q8WUQYknJs+3vJr3y3S4TL3i5vgnpkn3SCTAHD0ycek5wbA8o kO3Y7DaOf8S+xrS0m9VG6jqpVMZWziH2tzx/tYfawGaKiL8uRLvkv181yIGNA5szQ8E0 SOsiyOIWNAKjDWfFXrw/7/wUNe31t4v+t4wd+g3EcksXVJrobnvqJ+0JHNYgHwiZiWof M9A10vM6JqR8pS1NqsE/23jq8sVUGcDdMrHbAmM1GsKz0gafweb0NKDDj/VAaGTa96+t zE3g== X-Gm-Message-State: AOJu0YwhtrD4l3NMPx7a0kC9HododIktbd/OPfkd5G4CZjifwnHkGJsQ 15tjYPxKBCy/NKklVCORnZaPjB+G6A2pXTdFCryEcthILSnDcW39xOC+g8ye X-Google-Smtp-Source: AGHT+IFVcP9AdDmhrLTU+UM25ho+5onegkJQN4krzj2gamTjDPxmJrwbnD3uDiBP75BEOP8yoTbuuw== X-Received: by 2002:adf:a418:0:b0:347:48f8:9a8 with SMTP id d24-20020adfa418000000b0034748f809a8mr1619605wra.19.1713539633382; Fri, 19 Apr 2024 08:13:53 -0700 (PDT) Received: from localhost ([2001:8a0:f93d:b900:2438:d637:5572:c30a]) by smtp.gmail.com with UTF8SMTPSA id d9-20020a056000114900b003469e7f5c52sm4675097wrx.80.2024.04.19.08.13.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Apr 2024 08:13:52 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Cc: Jim Blandy , Mike Wrighton , Nathan Sidwell , Hafiz Abid Qadeer Subject: [PATCH 03/12] Document "E.MESSAGE" RSP errors Date: Fri, 19 Apr 2024 16:13:33 +0100 Message-ID: <20240419151342.1592474-4-pedro@palves.net> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240419151342.1592474-1-pedro@palves.net> References: <20240419151342.1592474-1-pedro@palves.net> MIME-Version: 1.0 X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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+patchwork=sourceware.org@sourceware.org For many years, GDB has accepted a "E.MESSAGE" error reponse, in addition to "E NN". For many packets, GDB strips the "E." before giving the error message to the user. For others, GDB does not strip the "E.", but still understands that it is an error, as it starts with "E", and either prints the whole string, or ignores it and just mentions an error occured (same as for "E NN"). This has been the case for as long as I remember. Now that I check, I see that it's been there since 2006 (commit a76d924dffcb, also here: https://sourceware.org/pipermail/gdb-patches/2006-September/047286.html). All along, I actually thought it was documented. Turns out it wasn't. This commit documents it, in the new "Standard Replies" section, near where we document "E NN". The original version of this 3-patch documentation series was a single CodeSourcery patch that documented the textual error as "E.NAME.MESSAGE", with MESSAGE being 8-bit binary encoded. But I think the ship has sailed for that. GDBserver has been sending error messages with more than one "." for a long while, and with no binary encoding. Still, I've preserved the "Co-Authored-By" list of the original larger patch. Change-Id: Ie4fee3d00d82ede39e439bf162e8cb7485532fd8 Co-Authored-By: Jim Blandy Co-Authored-By: Mike Wrighton Co-Authored-By: Nathan Sidwell Co-Authored-By: Hafiz Abid Qadeer Reviewed-By: Andrew Burgess --- gdb/doc/gdb.texinfo | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 57260a5b2fa..d6184d52841 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -42557,6 +42557,10 @@ number. In almost all cases, the protocol does not specify the meaning of the error numbers; @value{GDBN} usually ignores the numbers, or displays them to the user without further interpretation. +@item @samp{E.@var{message}} +An error has occurred; @var{message} is the textual error message, +encoded in @sc{ascii}. + @end table @node Packets