Message ID | 20230919054511.17998-1-klaus.gerlicher@intel.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> 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 8CDB8385840B for <patchwork@sourceware.org>; Tue, 19 Sep 2023 05:45:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CDB8385840B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695102355; bh=H3p0W9SrVddV9anai7GSBFbk+GqNVTkhfTlPDF7LJRI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=qJbbMcoIsacqL5NbhPZwcKcjUe2XRTrHMkflvD9qJfF4Vb+t/kk8kpFGp0nuwRIVo C6FZFLi+ltiPegv+sCfN6q5GQe2kfrFMmoTZPuMNsTWmlYttlB5JuwGEpcuDFfJFeX Cbuw7XmNkIWd9iXlgcOC1A/Q5foS0WOAOGqbnv6o= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by sourceware.org (Postfix) with ESMTPS id 5B8C43858D32 for <gdb-patches@sourceware.org>; Tue, 19 Sep 2023 05:45:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B8C43858D32 X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="377167739" X-IronPort-AV: E=Sophos;i="6.02,158,1688454000"; d="scan'208";a="377167739" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 22:45:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="695794032" X-IronPort-AV: E=Sophos;i="6.02,158,1688454000"; d="scan'208";a="695794032" Received: from dut1027pvc.igk.intel.com (HELO localhost) ([10.211.177.252]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 22:45:22 -0700 To: gdb-patches@sourceware.org Subject: [PATCH 0/1] replace PBUFSIZ with a target op Date: Tue, 19 Sep 2023 05:45:10 +0000 Message-Id: <20230919054511.17998-1-klaus.gerlicher@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_NONE, 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 <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Klaus Gerlicher via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Klaus Gerlicher <klaus.gerlicher@intel.com> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
replace PBUFSIZ with a target op
|
|
Message
Klaus Gerlicher
Sept. 19, 2023, 5:45 a.m. UTC
From: "Gerlicher, Klaus" <klaus.gerlicher@intel.com>
Hi all,
this is my first contribution.
PBUFSIZ is meant to define the size of the packet buffer for communication with a target. It needs to be at
least 2 * tdesc->registers_size + overhead.
This #define has been increased constantly to accomodate for targets with ever increasing register sizes and
this could therefore become a target-related setting.
The accompanying patch solves this by making this a target op that will be queried from the client on
startup. It will return the current PBUFSIZ as a default for targets not yet using the new target op. Going
forward it would be a good idea to upgrade each supported target with this mechanism, so constantly changing
the global PBUFSIZ define becomes unnecessary.
The patch was tested with the testsuite on Linux x86 and x86_64.
Regards
Klaus
Gerlicher, Klaus (1):
gdb, gdbserver: replace PBUFSIZ with a target op
gdb/remote.h | 8 +++---
gdb/target-delegates.c | 31 +++++++++++++++++++++--
gdb/target.h | 7 ++++++
gdbserver/hostio.cc | 54 ++++++++++++++++++++++++----------------
gdbserver/notif.cc | 8 +++---
gdbserver/server.cc | 26 +++++++++++--------
gdbserver/server.h | 31 ++++++++++++++++-------
gdbserver/target.cc | 9 +++++++
gdbserver/target.h | 9 +++++++
gdbserver/tdesc.cc | 11 +++++---
gdbserver/tracepoint.cc | 4 +--
gdbsupport/common-defs.h | 5 ++++
12 files changed, 146 insertions(+), 57 deletions(-)