From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by sourceware.org (Postfix) with ESMTPS id 46B4E3849AC0 for ; Fri, 19 Apr 2024 15:13:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 46B4E3849AC0 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 46B4E3849AC0 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713539631; cv=none; b=SqUn7/igjeRZFYbwYy/cwHKQ1JjKs6P8w0/xkfLfL+g8UeljlxlCU36BFukTJ8imBYtz8/JF/lMzWt/a+qVsv3LM0ahdnLSxngGwn7HkACGrMoPGQuGySN5usoK8mwA/0CrOeuJhj2r0sFT0+buQp/iTF25YQgRIO7B4f280UW4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713539631; c=relaxed/simple; bh=p81EPXfYlp3UA8W+ilitCOJU3fDrBQiJQY/XmqZUM34=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Ssdc2WSI2GlXdsta489O3ALQk6HS4H4cwXL97MirH2QOX770pJgzexwW93MHLACVp4Zq+ZsGp9+ODW/D3YYcvLT7Q4IjghzjZtQefFrBlIApQykHWE4/KSHwLOGs64+nC1Hc3WEO6WibsIEOPAJf2Uglvtfdm9oDSArB+CQbtvE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-343f1957ffcso1251604f8f.0 for ; Fri, 19 Apr 2024 08:13:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713539629; x=1714144429; 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=/8XDkIhgO0WGJosnOuALCLnspOgpLnsDDSI9fDiJAzY=; b=ffgspagc/8bHQAOi7JtczP6hTHUs3aEWNojyPL6zxXgbKiWlpAXrRxnzoDI1xnZ6BZ ueqjcduWEuQi7fyp+NMmL4QWc9reTQK0uC877WJkmL0WkuVx4mt0DpLnQPUQFBm+WCmS 4tYQP14x9pyfPLFQYA/wdHLu0+Mj5KQYwKMzrxBujAfqt2MnYmUEQ+rUlW2w+Ma0AaDq 3aV3a5l02cwyh2luXuPcYYE+CH7i8TPKhLSBc/ZHU58ZqprWXCI638IJZINK4HUV/hyO fLMYAz+m8eB1Md1Eqrj7SrMxcLNtV5hIrxF/QdX6XcVnM4jbqGWbHvzxxw+biKgEfrrj 0ESA== X-Gm-Message-State: AOJu0YxypKPhmpQdOI7Tw9O/gry+vOV+Y93j+cRBM0p57INTGlVCMWfn Uumf/fEOwX25Jx/+tYlvl3nNrD8m63BDbw1sWK6I5V9pplnk5fa1IHpgHyau X-Google-Smtp-Source: AGHT+IE3+66EGquDbj90rv365eIZ+QB2UoNHgS43Bqy+waTU/KaSPV8d0kHqh1aEmK3+ObYwEXEvPA== X-Received: by 2002:a5d:6a83:0:b0:348:b458:56b8 with SMTP id s3-20020a5d6a83000000b00348b45856b8mr4568787wru.17.1713539628726; Fri, 19 Apr 2024 08:13:48 -0700 (PDT) Received: from localhost ([2001:8a0:f93d:b900:2438:d637:5572:c30a]) by smtp.gmail.com with UTF8SMTPSA id s9-20020a05600c45c900b004170e0aff7asm10489639wmo.35.2024.04.19.08.13.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Apr 2024 08:13:48 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Cc: Jim Blandy , Mike Wrighton , Nathan Sidwell , Hafiz Abid Qadeer Subject: [PATCH 01/12] Document conventions for describing packet syntax Date: Fri, 19 Apr 2024 16:13:31 +0100 Message-ID: <20240419151342.1592474-2-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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.1 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 List-Id: This comment documents conventions for describing packet syntax in the Overview section. Change-Id: I96198592601b24c983da563d143666137e4d0a4e Co-Authored-By: Jim Blandy Co-Authored-By: Mike Wrighton Co-Authored-By: Nathan Sidwell Co-Authored-By: Hafiz Abid Qadeer --- gdb/doc/gdb.texinfo | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 31a531ee992..e9d54527c90 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -42517,6 +42517,22 @@ For any @var{command} not supported by the stub, an empty response protocol. A newer @value{GDBN} can tell if a packet is supported based on that response. +In describing packets (and responses), each description has a template +showing the overall syntax, followed by an explanation of the packet's +meaning. We include spaces in some of the templates for clarity; +these are not part of the packet's syntax. No @value{GDBN} packet +uses spaces to separate its components. For example, a template like +@samp{foo @var{bar} @var{baz}} describes a packet beginning with the +three ASCII bytes @samp{foo}, followed by a @var{bar}, followed +directly by a @var{baz}. @value{GDBN} does not transmit a space +character between the @samp{foo} and the @var{bar}, or between the +@var{bar} and the @var{baz}. + +We place optional portions of a packet in @r{[}square brackets@r{]}; +for example, a template like @samp{c @r{[}@var{addr}@r{]}} describes a +packet beginning with the single ASCII character @samp{c}, possibly +followed by an @var{addr}. + At a minimum, a stub is required to support the @samp{?} command to tell @value{GDBN} the reason for halting, @samp{g} and @samp{G} commands for register access, and the @samp{m} and @samp{M} commands -- 2.43.2