Message ID | 20230322171352.9087-1-mohamed.bouhaouel@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 1DF3538555A4 for <patchwork@sourceware.org>; Wed, 22 Mar 2023 17:14:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DF3538555A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679505271; bh=J5q7lKl3tgRyg2kIUxOaEKfQfbKP6XQgnLIDszMRv3Q=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=e7+KKj00/jVKiPkRGRp3L/HY3qg+mgWcta5EHcMwosAWmUuxR/Tdh2NlxFvWVXVFy 2OYYCEbcXC4XDE54dtnBN8vcyBf1cIZNTxws/u4EaigP2gktFu58mok5rzeJ/abmDJ MkDWmsF1xJUF6uR2PLvOw0vWs51SANnmkcVNxmkE= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by sourceware.org (Postfix) with ESMTPS id 89AD13858C52 for <gdb-patches@sourceware.org>; Wed, 22 Mar 2023 17:14:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 89AD13858C52 X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="323124682" X-IronPort-AV: E=Sophos;i="5.98,282,1673942400"; d="scan'208";a="323124682" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2023 10:14:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="675359448" X-IronPort-AV: E=Sophos;i="5.98,282,1673942400"; d="scan'208";a="675359448" Received: from mbouhaou-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.63.83]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2023 10:14:04 -0700 To: gdb-patches@sourceware.org Subject: [PATCH 0/2] Add more flexibility to inferior call Date: Wed, 22 Mar 2023 18:13:50 +0100 Message-Id: <20230322171352.9087-1-mohamed.bouhaouel@intel.com> X-Mailer: git-send-email 2.25.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.29 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: Mohamed Bouhaouel via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Mohamed Bouhaouel <mohamed.bouhaouel@intel.com> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Add more flexibility to inferior call
|
|
Message
Bouhaouel, Mohamed
March 22, 2023, 5:13 p.m. UTC
Hi all, The following two patches would add more flexibility to the infcalls workflow by allowing targets to have their own implementations of: * value_arg_coerce: Enable the target to control arguments coercion whenever needed (e.g. Coerce BOOL to UINT16_T instead of UINT32_T). * reserve_stack_space: Enable the target to decide how much space is needed for a type (e.g. Targets might have a vectorized representation of variables). Regards, Mohamed Mohamed Bouhaouel (2): gdb, gdbarch, infcall: Add value_arg_coerce method to gdbarch. gdb, gdbarch, infcall: Add reserve_stack_space method to gdbarch gdb/gdbarch-gen.h | 13 ++++++++++++ gdb/gdbarch.c | 44 +++++++++++++++++++++++++++++++++++++++ gdb/gdbarch.h | 1 + gdb/gdbarch_components.py | 26 +++++++++++++++++++++++ gdb/infcall.c | 32 +++++++++++----------------- gdb/infcall.h | 17 +++++++++++++++ 6 files changed, 113 insertions(+), 20 deletions(-)
Comments
On 3/22/23 13:13, Mohamed Bouhaouel via Gdb-patches wrote: > Hi all, > > The following two patches would add more flexibility to the infcalls > workflow by allowing targets to have their own implementations of: > * value_arg_coerce: Enable the target to control arguments > coercion whenever needed (e.g. Coerce BOOL to UINT16_T > instead of UINT32_T). > * reserve_stack_space: Enable the target to decide how much > space is needed for a type (e.g. Targets might have a vectorized > representation of variables). Hi Mohamed, Is there an end goal to this? It doesn't really make sense to add gdbarch methods but have no architecture use it. If it's necessary for some upcoming feature, then include these patches as preparatory patches in the series that adds said feature. Simon
Hi Simon, Thanks for your feedback. These patches are pre-requisite for an Intel architecture that has not been yet up-streamed. Waiting for the architecture to be introduced first is likely more logical, although, such flexibility might be useful for other new architectures. Should I submit a new version of those patches while considering your comments or wait to post all together? Thanks, Mohamed > -----Original Message----- > From: Simon Marchi <simark@simark.ca> > Sent: Wednesday, March 22, 2023 8:17 PM > To: Bouhaouel, Mohamed <mohamed.bouhaouel@intel.com>; gdb- > patches@sourceware.org > Subject: Re: [PATCH 0/2] Add more flexibility to inferior call > > On 3/22/23 13:13, Mohamed Bouhaouel via Gdb-patches wrote: > > Hi all, > > > > The following two patches would add more flexibility to the infcalls > > workflow by allowing targets to have their own implementations of: > > * value_arg_coerce: Enable the target to control arguments > > coercion whenever needed (e.g. Coerce BOOL to UINT16_T > > instead of UINT32_T). > > * reserve_stack_space: Enable the target to decide how much > > space is needed for a type (e.g. Targets might have a vectorized > > representation of variables). > > Hi Mohamed, > > Is there an end goal to this? It doesn't really make sense to add > gdbarch methods but have no architecture use it. If it's necessary for > some upcoming feature, then include these patches as preparatory patches > in the series that adds said feature. > > Simon Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de <http://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
On 3/23/23 07:34, Bouhaouel, Mohamed wrote: > Hi Simon, > > Thanks for your feedback. These patches are pre-requisite for an Intel architecture > that has not been yet up-streamed. Waiting for the architecture to be introduced > first is likely more logical, although, such flexibility might be useful for > other new architectures. > > Should I submit a new version of those patches while considering your comments > or wait to post all together? I think it's better to post it with the first architecture that uses it. It helps illustrate what the method is for and how it works. But also, if your port never ends up upstream for whatever reason, it doesn't make sense to have those methods with no users. Simon
That makes sense, I will re-submit them once the new architecture is posted. Thanks. Mohamed > -----Original Message----- > From: Simon Marchi <simark@simark.ca> > Sent: Friday, March 24, 2023 2:38 PM > To: Bouhaouel, Mohamed <mohamed.bouhaouel@intel.com>; gdb- > patches@sourceware.org > Subject: Re: [PATCH 0/2] Add more flexibility to inferior call > > On 3/23/23 07:34, Bouhaouel, Mohamed wrote: > > Hi Simon, > > > > Thanks for your feedback. These patches are pre-requisite for an Intel > architecture > > that has not been yet up-streamed. Waiting for the architecture to be > introduced > > first is likely more logical, although, such flexibility might be useful for > > other new architectures. > > > > Should I submit a new version of those patches while considering your > comments > > or wait to post all together? > > I think it's better to post it with the first architecture that uses it. > It helps illustrate what the method is for and how it works. But also, > if your port never ends up upstream for whatever reason, it doesn't make > sense to have those methods with no users. > > Simon Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de <http://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
Simon> I think it's better to post it with the first architecture that uses it. Agreed. Simon> It helps illustrate what the method is for and how it works. But also, Simon> if your port never ends up upstream for whatever reason, it doesn't make Simon> sense to have those methods with no users. Additionally, depending on exactly what it is needed for, there might be some other solution, not involving new arch hooks, that we'd prefer. Tom