From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by sourceware.org (Postfix) with ESMTPS id 3CBCD3858D39 for ; Mon, 24 Jan 2022 15:06:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3CBCD3858D39 X-IronPort-AV: E=McAfee;i="6200,9189,10236"; a="246282348" X-IronPort-AV: E=Sophos;i="5.88,311,1635231600"; d="scan'208";a="246282348" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2022 07:06:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,311,1635231600"; d="scan'208";a="624106305" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga002.fm.intel.com with ESMTP; 24 Jan 2022 07:06:35 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 24 Jan 2022 07:06:35 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 24 Jan 2022 07:06:35 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 24 Jan 2022 07:06:35 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.43) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 24 Jan 2022 07:06:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KOrUvNK7i+sHDCtFNUSALSizIY1D/bMiQ3FcjqwZtUVQG0BAekfO8rYd0d7Oqc+u98IfhmoDU7/EUcwrZTJK68HgjI9Fy3XAO7s5jdI5/H1e/ZJ1HAuetDNUbvLV57GnBovR1kzf49Qu0KgXAiWeNCCKRpCuuccvKqgqPNHSSsjpgl/s6aqbk+Dj3TCevPJ0ccmVr20mw5ziJ5+kBo51J5Isx2qi3/SpT4L1Ihf5aTh8IL8LH+BxMA+h7EuUgehU8hKgfxjfGoNdRlxCAia5bIFmtoCyT/cgPvefoIXNWiBiwFjly8NL1qoWHAfCTnfiZLXKzAJURPTmDxuu/U6hIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lIlMq4WIpghxGkpm14xw01KfQC7tm+8aPyxDQXC4A3g=; b=LTUjm9Bp0+o71cgSOboEwwrxCTSMqM+F13RAuGSwMXSv616Ogu1mlMNsw+k9RAuVQzRclZKpH4nmGOZfEpU0sLCHGzT3TV3jX/R5qcjnLvHc4nOLAm2jxP6qnBS4/b0F3v1yeJM+khYBRAir5PqxqgOxpjz2pJCcIkNHUIqBOdoJRLgVqvIh1CSlMlWsDVsc0+09yIoyLH+cvAtTnX9PM93SDTH60mEYKzNbIiQlLPEwvOFmHww5KfaddoAeqnaXbmUq+2ETQwMZSQtEfBDjzChxpoxG7LS4yAgDyTD47zb1btmR62oPnWDesFwWp5cNCzA+M0sN23ivuYx3vkE/VA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BYAPR11MB3590.namprd11.prod.outlook.com (2603:10b6:a03:b2::23) by BYAPR11MB2583.namprd11.prod.outlook.com (2603:10b6:a02:c6::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.12; Mon, 24 Jan 2022 15:06:31 +0000 Received: from BYAPR11MB3590.namprd11.prod.outlook.com ([fe80::698d:2e18:3937:69ce]) by BYAPR11MB3590.namprd11.prod.outlook.com ([fe80::698d:2e18:3937:69ce%2]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 15:06:31 +0000 From: "Schimpe, Christina" To: Andrew Burgess CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH 2/3] gdb: Add per-remote target variables for memory read and write config Thread-Topic: [PATCH 2/3] gdb: Add per-remote target variables for memory read and write config Thread-Index: AQHYCJFTBgSPlL6gdE6pE/Dn5z2ET6xortoAgAmeIvA= Date: Mon, 24 Jan 2022 15:06:31 +0000 Message-ID: References: <20220113152118.1465255-1-christina.schimpe@intel.com> <20220113152118.1465255-3-christina.schimpe@intel.com> <20220118113904.GE622389@redhat.com> In-Reply-To: <20220118113904.GE622389@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.200.16 dlp-reaction: no-action x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6d5840d7-0f16-4e02-272b-08d9df4b1b0d x-ms-traffictypediagnostic: BYAPR11MB2583:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oJ68YP1euG5+tWqwiNxTysOL5yuf5WXlFFc5FZWhE8cWcuJzb22Tg2PXIZCERH0arH/+jeUGfUzMuDUQ+aRATnxBNHH48IKl9woIpPJKgJrXKOS8E0TmyT4E4cM4oLgYH/cW43PaY++SOpM7yYZT092vcSql5fmUZUGwFY/68HXguY92zOBrIjmE/Y0Ml7Rr1WrSNb6l29szpAilbSEGNyByTkDUjeB8SHAbav33BLmV0H15oQncbs9KHEDSMhc/MtArBrZUr5W1uukfipCZtFsc9R2eBjkD8K4s0EbIGRZIvSeJ+kixduiVUb/FskxCiyCLvvPus2X/LzmmC6RU/QpfdPUar1B4kKsk/X8kTEh71cI4FYzAQjAeuexN9efzk/zyAklGRW8v36QAOHY25QiLpP8BsrIAC3ho9uLp7vjlNzmokECmVWx2jG/j7ytn3Zq4fnuhp6ibbGhjistskecH7E7d6hyWmXC7A4mpcbXXLvS2sldJIb3H9nfbBh+fDiW24tJCyzC1tTj6u4Vb08TG9yBPx3u+y5oDzsmydTKSX3DNime1rAiGKpIUpEi3tJlS1jOrgUvqYCxL8DzwdvLf9/9him2r+KHPiTeLTScd6M2txRGQ89MJUjkwQS0lLI7Ob4zOwtefaepZUuMoEZj4LanGFbOVP8WQwLgJQmy86Fo7f8FeQvt3h8PAuKq3rUeAKMyUsb3aU+rBP7v8cTfUt/CFl1kh4xdHokYzAO71PEbkotfu8jSbNlRdgJYpUjouBXE9V+hiWSOKhMn2SmWTVJOO8lBoQziU3wE7vo8= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3590.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(186003)(71200400001)(86362001)(316002)(55016003)(6916009)(8936002)(76116006)(8676002)(82960400001)(52536014)(5660300002)(64756008)(508600001)(26005)(83380400001)(6506007)(66476007)(122000001)(66946007)(33656002)(84970400001)(7696005)(38100700002)(66446008)(38070700005)(4326008)(2906002)(9686003)(66556008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cH8zXTFZr82Fdbg/IAA1XGB3ZSprNewcV0r5YY2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I/2bcSsQToDKvHrd5r6CRNnfaJ2G9PjZslc8IndLSf0Fr?= =?us-ascii?Q?a68Fe9/AMB2wrtX7pPZ//Lwzn7W4ApaOJtwncTKztf2CUiIzgxiJEcj5RojW?= =?us-ascii?Q?bjY8zfcob2TPA/xU8SlcGgM9X9iJWiZIZAZkBBL0XOTjMd3Mbiblm5dVdP4K?= =?us-ascii?Q?QKa2xLFKdTVQgm4x5UkWf5BGnDf+6p0RPl2h3wUHzIeIlrpsQR9nkm81oYdz?= =?us-ascii?Q?aSYrZtLzlTEIhAk3SAa+r0l/zzdsNGMZqFPKvTL+FzAJCWgaNLRMWwfgdCVH?= =?us-ascii?Q?1xvzkQljJl6FNymxVVXHXp//hck3A9k+mGYEOFHRrhF6wSyKqoZHb5t76t1X?= =?us-ascii?Q?/rdT/T70yTEAqkZX74Q0uQVg9et7kZNpTgYkrdKibqFLImrzbsdO/2C7ZTi3?= =?us-ascii?Q?BtnTuzEYJmbjOYuFt+/HjLsRj+QZd0sZzBA4p7dqtnJcTMpwGr8IHaRLBG9a?= =?us-ascii?Q?GSeHW/EwtsCfT4Q9s8VW89GDtmqHzVf9nG7JA4Z2hF8o1suiLz3wJ6B3od2r?= =?us-ascii?Q?YCxT9UN/VJ5l0x+LmVbVa09ev4XRLZmSzkDrTdIc3oevzlIeGem3O3JnFwhG?= =?us-ascii?Q?OdMOfAZ48iMwKjarpUye9qUxtOrz6gGIZBQFj692Sji/ngW1tRw7s2QBxD/p?= =?us-ascii?Q?tAxKYValDEZ9KA6mrJB6Tqu5f+HzDQMupowo3hcXkg4s8DRvUiO6zjVyRDey?= =?us-ascii?Q?iS3GTe1OszR8Lfgzbfz51nGX8FA4E1XFo5/NZDHHHiA9LB+BASeO+x7DKh2j?= =?us-ascii?Q?fXOSQQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3590.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d5840d7-0f16-4e02-272b-08d9df4b1b0d X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2022 15:06:31.7774 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CqQt5xgI7E7ShCE0soS8WDtcb/xrRC2Hvg0Bp/+gGidK7+r2+gKLGjCNp/56do7b1XyAtbs9zx8zrFu3/EVg+7DDUrwXeJPPCetpQpWoxFg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2583 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.3 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Mon, 24 Jan 2022 15:06:40 -0000 Hi Andrew, Thanks a lot for your feedback. Before sending a V2 for this patch, there is still one point I would like t= o discuss (refer to my answer to your comment below). I also noticed that I missed an adaption in the function static void show_memory_packet_size (struct memory_packet_config *config) at = if (remote !=3D NULL) printf_filtered (_("Packets are limited to %ld bytes.\n"), remote->get_memory_packet_size (config)); In the function call get_memory_packet_size the global configuration is pas= sed, but the current target's configuration should be used. I will correct this with the next version of this patch. = > > The former global variables for that configuration are still available > > to allow the command line configuration for all future remote > > connections. Similar to the command line configuration of the per- > > remote target feature array, the commands > > > > - set remotewritesize (deprecated) > > - set remote memory-read-packet-size > > - set remote memory-write-packet-size > > > > will configure the current target (if available) and future remote > > connections. The show command will display the global configuration > > and the packet size of the current remote target, if available. > > > > It is required to adapt the test gdb.base/remote.exp which is failing > > for --target_board=3Dnative-extended-gdbserver. With that board GDB > > connects to gdbserver at gdb start time. Due to this patch two > > loggings "The target may not be able to.." are shown if the command > > 'set remote memory-write-packet-size fixed' is executed while a target > > is connected for the current inferior. To fix this, the clean_restart > > command is moved to a later time point of the test. It is sufficient > > to be connected to the server when "runto_main" is executed. Now the > > connection time is similar to a testrun with > > --target_board=3Dnative-gdbserver. > > > > To allow the user to distinguish between the packet-size configuration > > for future connections and for the currently selected target, the > > logging of the command 'set remote memory-write-packet-size fixed' is > > adapted. > > --- > > gdb/remote.c | 94 +++++++++++++++++++------------ > > gdb/testsuite/gdb.base/remote.exp | 7 ++- > > 2 files changed, 61 insertions(+), 40 deletions(-) > = > This needs a NEWS entry and a docs update. > = > Like with the previous patch, I think we should consider having the set/s= how > commands print more informative messages about which targets are being > changed or displayed. > = Yes, I agree, this could be improved. I was wondering if we should then ad= apt the show command such that it behaves similar to the previous patch e.g. = "The show command always displays the current remote target's configuration. If no remote target is selected the default configuration for future connections is shown.". = For the GDB user it might be less confusing if we keep the behaviour of the "show remote" commands consistent. = > > > > + memory_packet_config m_memory_read_packet_config; > > + memory_packet_config m_memory_write_packet_config; > = > Comment new fields please. Yes, I will adapt it. > > @@ -1956,9 +1971,16 @@ set_memory_packet_size (const char *args, > struct memory_packet_config *config) > > ? DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED > > : size); > > > > - if (! query (_("The target may not be able to correctly handle a= %s\n" > > - "of %ld bytes. Change the packet size? "), > > - config->name, query_size)) > > + if (target_connected > > + && ! query (_("The target may not be able to correctly handle a > %s\n" > = > The space after '!' is not gdb style, could you remove it please. > Also the two below please. > = > Thanks, > Andrew Thank you, I will adapt it. Best Regards, Christina Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva = Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928