From patchwork Wed Jan 11 18:37:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 62960 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 B1DC4385840E for ; Wed, 11 Jan 2023 18:37:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1DC4385840E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673462278; bh=kfMsE17/9YlaPbLB6Xle1KXeTcJO9N3W02juNgD/m9I=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=OhhhWiw3HMPH+gdj7CEZqdFCVTLw5lkF9/FrUD4H/Mf5i+2QUTLn4/PZzI4M86dBy d+4E0dhqLedikUeV1aS+cvPOe3SgqDrJMINgstkPRpXYPI4mLWWRsmpYlNvb4CtkLE wjP35tTl+H8GFCE1PwXyxE2iu6po2QAdHgn66hQc= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by sourceware.org (Postfix) with ESMTPS id 704F93858C83 for ; Wed, 11 Jan 2023 18:37:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 704F93858C83 Received: by mail-il1-x12f.google.com with SMTP id bp26so8315060ilb.3 for ; Wed, 11 Jan 2023 10:37:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kfMsE17/9YlaPbLB6Xle1KXeTcJO9N3W02juNgD/m9I=; b=BYX9gREpD7LqvJ8hjtWLG+1GB1Mvchn7UFxQn5Bdc80WJwEXSU7rSQToUx/u2h2AoE mnXYctq6Y/ojz0lHZMBXab3aYyCtRQFVSe/1SN7e9xvaWocNh0mWNjCkFoRLkyWzhZnV upZ73zaXP0kIGSfOMPRqozXUD7Hm3YyijdAXUeS7lGzovkjJXZtgg0JwInEG0MM40mbe w6/o+fVNkxi9n1donbU7SM40X5PzSSypLHMY0tflALQzTFnxoLOtcGDqZQmG2Z2woSnp RrV5oVEvHQkVQcfOFO6MkdCZNZm2TNzLiwzY9z4Ad1b1t3FwMvjfHYNCHOaG4ejFnHxT XDjQ== X-Gm-Message-State: AFqh2koPZcAVR5sH1QI643xgcVGiytHzg3ObSvKlqRgNXE7xtniauOIX 206i1yuSn2P3KXeBGCuBPTLGKgIYCRAJSpaj X-Google-Smtp-Source: AMrXdXvsEflGOVY2AW/pU6gGuqddK5ByZ98Ks5eHIrKdTZUYb3llOFVvoPrxzYSeRUxFLVN1IIM5Kw== X-Received: by 2002:a05:6e02:1a8c:b0:30d:9400:ddb7 with SMTP id k12-20020a056e021a8c00b0030d9400ddb7mr18593792ilv.28.1673462252726; Wed, 11 Jan 2023 10:37:32 -0800 (PST) Received: from localhost.localdomain (97-122-76-186.hlrn.qwest.net. [97.122.76.186]) by smtp.gmail.com with ESMTPSA id t9-20020a92cc49000000b0030bb7c67efcsm4610301ilq.16.2023.01.11.10.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 10:37:32 -0800 (PST) To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Update the 'g' packet documentation Date: Wed, 11 Jan 2023 11:37:25 -0700 Message-Id: <20230111183725.2902496-1-tromey@adacore.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom Tromey via Gdb-patches From: Tom Tromey Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" The 'g' packet documentation references a macro that no longer exists, and it also claims that the 'x' response for an unavailable register is limited to trace frames. This patch updates the documentation to reflect what I think is currently correct. --- gdb/doc/gdb.texinfo | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 9c0018ea5c1..80584241870 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -41318,11 +41318,12 @@ Reply: Each byte of register data is described by two hex digits. The bytes with the register are transmitted in target byte order. The size of each register and their position within the @samp{g} packet are -determined by the @value{GDBN} internal gdbarch functions -@code{DEPRECATED_REGISTER_RAW_SIZE} and @code{gdbarch_register_name}. +determined by the target description (@pxref{Target Descriptions}); in +the absence of a target description, this is done using code internal +to @value{GDBN}; typically this is some customary register layout for +the architecture in question. -When reading registers from a trace frame (@pxref{Analyze Collected -Data,,Using the Collected Data}), the stub may also return a string of +When reading registers, the stub may also return a string of literal @samp{x}'s in place of the register data digits, to indicate that the corresponding register has not been collected, thus its value is unavailable. For example, for an architecture with 4 registers of