From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id d8PsD+qmp2iuAwkAWB0awg (envelope-from ) for ; Thu, 21 Aug 2025 19:08:26 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=m1IcilOd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2EE881E047; Thu, 21 Aug 2025 19:08:26 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E49021E023 for ; Thu, 21 Aug 2025 19:08:19 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6F47F3853834 for ; Thu, 21 Aug 2025 23:08:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F47F3853834 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=m1IcilOd Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id 24D91385E004 for ; Thu, 21 Aug 2025 23:07:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 24D91385E004 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 24D91385E004 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::235 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755817669; cv=none; b=rJiqZq4Hpxx9kgkSuIyltGdFtKWdcYLc8vD1ftFH6WRqSKvd1AF3obTgkndzeg+Q+HsgB1TEyESJD5zCnZ0fI5eF9jvQ1GdAF6xD7XkOQjLogdeE8z9rMcibb8DsIYpf3kB91A+GOr9xTws2le+CnQeo1XkN2BH589cAvuAd6Pw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755817669; c=relaxed/simple; bh=VR8FAc+WfDx3ChprM7S25ysO533faWLb6C3d64IrRI4=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=FnOh2L8im8FjZ4U/dENCtoU22n5K1ApUJJYmxN5RlToskeW9XVyOSW5Ljr5A6TIUZ+PMFSiWK4h5Iy7kWqIJU8ySasYkymUqYi54H4WhlLu24onFqGTiEQaPgw765ecRu8t8V6SQCN1h5RC5u+HjGzfYuHSA64/IaU/KC1wjuQE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 24D91385E004 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-333f92d682bso12669371fa.3 for ; Thu, 21 Aug 2025 16:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755817667; x=1756422467; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VR8FAc+WfDx3ChprM7S25ysO533faWLb6C3d64IrRI4=; b=m1IcilOdGjUhnlPjKNfVT892K0IjgSiPGFx+rB5RFR1ckbxKLT+oBA7n8vDpQW34+p nq7coWas9fic7Cyc11bwnuRISs173Ew53QxKwyLeB1SsoRa9s7dr+2N2rN6i8u7wdMbH 5Vw7mznjo3WjmX1jdu+fhZCUB3/RcJodZR6Gj1/PZiEIC2yuuMKFPJTq4OZw0Vd2fRFV zVBOcJPGdqYcmnp/wtfNbtJIx1dOTD+k0ZePwW3hlg3iViW2w5GFhV9urOHh9iF6y6G+ 66AOQfJSI1QNQA4KY+bPkEMui/UCI1rc3DX4kvqvchjsjGvMOvfZNz6tKM5ICmvh45uL rpqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755817667; x=1756422467; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VR8FAc+WfDx3ChprM7S25ysO533faWLb6C3d64IrRI4=; b=bWkKJwK1h8+c8/iVZLzipAK/1wPPGCPlb5nzh7K9oAU/5l6ASwKVWibqMJU9MoASsK kE8ehotZh1V06TdowMb5540RjIbb/mhxFY9YCu4oVoKPUu55HZESTV4kt5zLqdwHUXC5 05rGUCMPMWgJ2yjUqcDVegMpwtHpPBds59URy8Szsz3ncjYRzf3fKaKhMBDX+ewrM7sC CgJq04vJosN5wneXs61ZtjJPBc+yqQxVPN/BfC7WoN6wRIQEslvbn+SxOeIYE5/5oh3v 6nN6XDvEmGAvsjQTIzsECK8XP0/gRQoBX9+419zS3mRQO50Q2P8lf/A5BbF8OC8twk5U 1o9g== X-Gm-Message-State: AOJu0Yyl+xIppWW/jUx6P/BADyKEbVKBDrrYpTCkxRDnqHFjJb+N39zY Ikn0fDag8eflMhPzG8Xhv11gYfywTEi/isT7hw5K9itvnq9nMIDX0rW8Z8K6RlMWNpdTB+QwMYJ AujDb/kc5+Ol3jPsr6R7hqEvW5JMHkznK80uo X-Gm-Gg: ASbGncunEpKxEd15VG0kg5CTnSIbQZDzUmh2eOIrmwuUJ6noLq+lL4B4JagL65V/If/ +LIv8m0r6sAEpz3MkfDQjeKPphwRZ7mUUyM8CaidV3CKjIP4+EeLs3EmPveh4QsW8fGfOor/Tky Gx9qMm72ONOnKuTS2tnlXi+VRpvJR0peTQ3YImG39m0Tsm5ywzPPoxAfa4exu+mdge83Lrw/j0t 1fkvjE2EgiGbdrPq5NgeMpB2OMw X-Google-Smtp-Source: AGHT+IGyd09Qj48TZ7ocNcBUQk8WYfiMV546BqSlhC7YTbaUiiepja0Mzx/fmEiuNbUU7w5XMG8tfotJGxiL7hK1Y8M= X-Received: by 2002:a2e:b887:0:b0:32b:3cf5:2ff3 with SMTP id 38308e7fff4ca-33650f3e261mr2050511fa.22.1755817666966; Thu, 21 Aug 2025 16:07:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aaron Griffith Date: Thu, 21 Aug 2025 19:07:35 -0400 X-Gm-Features: Ac12FXy12orydQS982Ch5ou2KlalrGRMiOPNQDXDDXflgc7iBV6CGr-ngRnnckI Message-ID: Subject: Re: Proposed Addition to GDB packets To: "Alkallas, Mouhanad" Cc: "gdb-patches@sourceware.org" Content-Type: multipart/alternative; boundary="00000000000054798d063ce82858" 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~public-inbox=simark.ca@sourceware.org --00000000000054798d063ce82858 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Aug 21, 2025 at 5:05=E2=80=AFPM Alkallas, Mouhanad < Mouhanad.Alkallas@amd.com> wrote: > The proposal is to add a packet =E2=80=9CJ=E2=80=9D for customization in = privately > defined KGDB IO Module. > > Packet format would =E2=80=9CJ =E2=80=9D, instead of gdbstub= .c handling > the packet, it would forward the call to the attached KGDB IO Module > to service the packet. I'm not familiar with KGDB specifically, but a common solution used by other stubs is to use the "qRcmd" packet for custom commands. I know the Black Magic debug probe uses this to allow the user to scan the JTAG chain it's connected to and a few other things. The documentation for KGDB [1] indicates it already uses this packet for some commands. Is it possible to hook in to that existing mechanism? Or is that unsuitable for the problem you're trying to solve? [1]: https://www.kernel.org/doc/html/v4.14/dev-tools/kgdb.html#running-kdb-comma= nds-from-gdb -Aaron --00000000000054798d063ce82858 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Aug 21, 2025 at 5:05=E2=80=AFPM Alkallas, Mou= hanad <Mouhanad.Alkallas@am= d.com> wrote:
> The proposal is to add a packet =E2=80=9CJ=E2= =80=9D for customization in privately
> defined KGDB IO Module.
&g= t;
> Packet format would =E2=80=9CJ <custom data>=E2=80=9D, ins= tead of gdbstub.c handling
> the packet, it would forward the call to= the attached KGDB IO Module
> to service the packet.

I'm = not familiar with KGDB specifically, but a common solution used by other st= ubs is to use the "qRcmd" packet for custom commands. I know the = Black Magic debug probe uses this to allow the user to scan the JTAG chain = it's connected to and a few other things.

The documentation for = KGDB [1] indicates it already uses this packet for some commands. Is it pos= sible to hook in to that existing mechanism? Or is that unsuitable for the = problem you're trying to solve?

--00000000000054798d063ce82858--