From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sFisE2L+PGAGJAAAWB0awg (envelope-from ) for ; Mon, 01 Mar 2021 09:46:58 -0500 Received: by simark.ca (Postfix, from userid 112) id 451DF1EF7E; Mon, 1 Mar 2021 09:46:57 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id CFA941EF82 for ; Mon, 1 Mar 2021 09:46:54 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 135AD3939C3F; Mon, 1 Mar 2021 14:46:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 135AD3939C3F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614610014; bh=0vs7EQMurZB9FIL13vON1+5z/8jNbbA4gI46O3/Xbl8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=AeNLJZs0Flh5e/2HDDBrIGfPRWyQ81WIgC4H+uuelxbRcaIfjnA0OEzgu1aAyJCUg OAra8pVtvFsugp2mJ0kEXgN1WT889dBzKPyz5Uk9DgpjpCDYMGZajz7xfI8VXisbna HPQuOZ/6PB4uGBtuQ0vdIh4q9cOdukPl7w8/k/JY= Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680065.outbound.protection.outlook.com [40.107.68.65]) by sourceware.org (Postfix) with ESMTPS id D25B73939C1C for ; Mon, 1 Mar 2021 14:46:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D25B73939C1C ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uz1gWpsdwpSUAdhfzwojNSPb1MlX53MS+wNE7R62Bk9zHpacvYBpHpb45PWWUIqwEOKyp8ARAf7lzCGW1TC1czVNVMcoYmYsbi6FV/Agb55Hl5Vw5euZ/emXsEWVFM5upi5km4IqpRpwQr1RjF4lXUl6Mub4n+fL0+yHB8J9TTVKTXXep1Gmx3V+7UtUE/u3u99dCWdv1gSOgKpYtbiNLzL4+Z1yCjnJEutQAvpyteUrLv9VmtR4l5eUvi2hX/0+TdTiciP9mQEec946k746JbadKAyQbHhGeiOId3lgvwk80i1liGs/idfQkpcc+0PVDGdWQ7S8uAjSidLXUZTPmA== 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-SenderADCheck; bh=0vs7EQMurZB9FIL13vON1+5z/8jNbbA4gI46O3/Xbl8=; b=J8rGSIbxhitCR+5Ylajl9mNj4SJV7LmiFIwXi/8hwCPUwpGeu8JlgaZ3nRN3Ka4fFJzETdELfGSrhp1fSF1pfQDVKKYOrXwpbmkSWWP9uXEOXGQ2Zbgwmm8+gniDieUkl+TTgvutE3C2w5jl1gp30DipHBJ7jsv106aesCepWZ28RRUz3fO+kqHiOWBJjipjLkPpxIUOJYHNL5N5MFc4z7VEoJoa7RaWULlSWahgfUGMz9YPWpTdqWeijMFzUGTp4CmoWzdWifUu4i+OgLT8We8oV60OG3xrXmNNz5TNGY+XvgXv/SIsOEdU6L7pEuWLoSZdVzwfIrYCUjU3EiFmDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none Received: from DM6PR12MB2762.namprd12.prod.outlook.com (2603:10b6:5:45::15) by DM5PR1201MB0041.namprd12.prod.outlook.com (2603:10b6:4:56::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Mon, 1 Mar 2021 14:46:49 +0000 Received: from DM6PR12MB2762.namprd12.prod.outlook.com ([fe80::31d8:f503:f7b2:f44]) by DM6PR12MB2762.namprd12.prod.outlook.com ([fe80::31d8:f503:f7b2:f44%3]) with mapi id 15.20.3868.033; Mon, 1 Mar 2021 14:46:49 +0000 To: gdb-patches@sourceware.org Subject: [PATCH 09/43] Move push_dwarf_reg_entry_value to expr.c Date: Mon, 1 Mar 2021 14:45:46 +0000 Message-Id: <20210301144620.103016-10-Zoran.Zaric@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210301144620.103016-1-Zoran.Zaric@amd.com> References: <20210301144620.103016-1-Zoran.Zaric@amd.com> Content-Type: text/plain X-Originating-IP: [2a00:23c7:5a85:6801:b4ed:fe7b:8064:d4d] X-ClientProxiedBy: AM0PR04CA0073.eurprd04.prod.outlook.com (2603:10a6:208:be::14) To DM6PR12MB2762.namprd12.prod.outlook.com (2603:10b6:5:45::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2a00:23c7:5a85:6801:b4ed:fe7b:8064:d4d) by AM0PR04CA0073.eurprd04.prod.outlook.com (2603:10a6:208:be::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Mon, 1 Mar 2021 14:46:48 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0dd519d2-f419-42f7-b139-08d8dcc0d831 X-MS-TrafficTypeDiagnostic: DM5PR1201MB0041: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +ZCKbBL+c7+OM72xC38SOGBBj7xi7ir+EyDZhC3295VVYqrJ5nFfCCnCmz5AcdTaWagF1kU4nLdo+PoiyIubaIaFS/aaQvoeldJ7t2f+yrVLoEsxCxKuIu6v/HsS2VuQ3qcfDkSzMl7GiM6SSmnRv+glsHdVj488krNSk5xJyuDuZqqvSmvU1B95RPxoPmo+digs/bcc/PeAt9bJywqHDv5gTazOFXTMi5AkGc5hCRwYVD/M1On9qNqOS8Q6FiiniUt7VnfJT/Y/g/JLzqhvlP8Pv8tDUjuEsByBxm05vKWImw95P8yFiaeZEPDxyxL58nyPUeF+t+aq+bQAXPA9pftcfh7FLO9N9voKj1Ea9ofpwMmYMeUBJPRDFCT/nd1GpEj1JkNA0mKoJYQ/RvAm3Gx94L/YI6LSBjVAD22VBca4yRaiKPHDvo7ZYRpAJu0WcHw3IeORhOnQs2nva5FMyins3RP9TtJ+Sl6wsod5xpbii4/aXUDlfzSez+qukpOgzcDONS9fSCll30MQ6Nn0f1DLMUaCwIh6ISCNDHTnt/Z0SJgrhxJsvRCrhpUqo7DIvCnnu+uZkK3xG6/AaIyblg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB2762.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(346002)(136003)(396003)(39860400002)(478600001)(83380400001)(52116002)(66476007)(66556008)(36756003)(69590400012)(6506007)(66946007)(8676002)(1076003)(5660300002)(316002)(6486002)(186003)(2906002)(8936002)(6512007)(4326008)(2616005)(16526019)(6916009)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?ZuyYJz2gHeMB3QHOEbPH2JW8HNdWxNCBp9WE5rS0L5oXXuTlAozHYg/Ka7Va?= =?us-ascii?Q?dQdyJOGwLGpHx7qCcB52i1MfvMFukivlu/4RPOx3vOa/UIO5v3Qy8J6DA6SW?= =?us-ascii?Q?kuu/uB5hPRGZLLc48zHBP0Ax2bOijvRFmXMV+J+st2meznCrZdnGOZq75tra?= =?us-ascii?Q?1RFpYF7LqFkpjha522HmZiSlg7ImoMmqOfQumur2dmkP+5Vscf6PARUQvfX9?= =?us-ascii?Q?ocXGHkSeyBuZvsrym6MJQAYG98F+dyAYqohEU7XuFJSrKk6KyvD7b6uew8gm?= =?us-ascii?Q?wN9vjWSp+zgcq/aWknnq7pJEh1vDhJIDyBexUtgX29chR1IQpzGDdNNtV85t?= =?us-ascii?Q?eh6Ra+W62bGyIe4u6BNYZzxB/JYCrhEgJ9OeADYAdyNzTPoPHXWoA2NhGE+2?= =?us-ascii?Q?+7xJzuw6n7YyXqA8DWFDhAf0JVXRoFZgdafj6FE1PB8OxN1NCnXEkjiaTXSA?= =?us-ascii?Q?6+g+ktImy2hMmMd93VkErxAKT7hMVDah7H0LlzejgW/zvwditut6RVrp65Hi?= =?us-ascii?Q?PGSFCHcFaoo8k3amk/9ogsshuqFBI3jjVTtkY1VB3PuxhH+WF9IwKlcFFlVC?= =?us-ascii?Q?vT0rzle2phhRhXCwS9i1yJFKznk/khjnDe9VsPQ9mt5gIhLQt+zMX4j/SUuh?= =?us-ascii?Q?My5nkF+VZt9F14bH9rf6zEI2el5uKpptOhTMr58jK0GMkvDuIKgbf0iId+3e?= =?us-ascii?Q?8cTzF2t9Dt7uJDhIssmhVq4Oym7Q7OdkO7anc75lw4WBpoywtAPA5J54bHjw?= =?us-ascii?Q?SH4eJciiK2vVKaPWyRt8fqy8DSi+mFyYSka+eEtCJ4GxRhwBStcXrYu9nMQf?= =?us-ascii?Q?wMYielZ6Mi0gBimFYMIkjpTYnH4Tlmuu+ekVrrZloONK1O2whhMuyOMcWC6T?= =?us-ascii?Q?CWTWZGFA92wpwf8tYIjZVD/oJX8CHr9up6KZEamC0zJoNZvieXGIwSx68QDi?= =?us-ascii?Q?QffFpUHoQNf+V3tr6VtcRZUDroKzeF4DAPOgxqn+NMFHqd4R1VyHbY0iZ6wp?= =?us-ascii?Q?vLntmcx0Pju28j+DJ3QtZJIk0ceaGDPCtQ5zrvp1UUy0jnXqusVQv7g/kL9Z?= =?us-ascii?Q?8CwGVSz9rwyXSkIDOrWxoqpDthyi9AHaUnw41P2GruxQVt0QNe+3AD0GIvwM?= =?us-ascii?Q?3i47fbxm2SiUZMGc+DYzeWHQmunbfhuw477xe1afNxayG4eFuDkZuubVuRf0?= =?us-ascii?Q?Hg8hkJBnA80eMpmjbmoi3N8ruJE60QonOhS93t0WcQDOD9C/UUAvNrmjBQd4?= =?us-ascii?Q?UEYlm76P9EXIzlNidkZcbajrlfrD95xE6AsPcH6G0CjuJzyHtNNZvJjbMWjX?= =?us-ascii?Q?93uJl6jA5dPW1642M+KKIOa4H6PO74/pl+/WSj8T3jWBLikeMDwpny+XmGSr?= =?us-ascii?Q?KcS4j6gHtW/SYLKQnDQ2dVfKXCjw?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0dd519d2-f419-42f7-b139-08d8dcc0d831 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB2762.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2021 14:46:49.3900 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NhUOzsqPwTGyCyBJMUFfaXAjXq2ipX46Hm30BbpUzv4kg6RI3Os3JNSxfZp+lnheKC0Wo3aLbXd1FOxbZZWRxg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0041 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: , From: Zoran Zaric via Gdb-patches Reply-To: Zoran Zaric Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" From: Zoran Zaric Following the idea of merging the evaluators, the push_dwarf_reg_entry_value method can be moved from dwarf_expr_executor and dwarf_evaluate_loc_desc classes to their base class dwarf_expr_context. gdb/ChangeLog: * dwarf2/expr.c (dwarf_expr_context::push_dwarf_reg_entry_value): Move from dwarf_evaluate_loc_desc. * dwarf2/frame.c (dwarf_expr_executor::push_dwarf_reg_entry_value): Remove method. * dwarf2/loc.c (dwarf_expr_reg_to_entry_parameter): Expose function. (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value): Move to dwarf_expr_context. * dwarf2/loc.h (dwarf_expr_reg_to_entry_parameter): Expose function. --- gdb/dwarf2/expr.c | 51 +++++++++++++++++++++++++++++++++ gdb/dwarf2/expr.h | 16 +++++------ gdb/dwarf2/frame.c | 7 ----- gdb/dwarf2/loc.c | 70 ++-------------------------------------------- gdb/dwarf2/loc.h | 14 ++++++++++ 5 files changed, 75 insertions(+), 83 deletions(-) diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index 872de16cd70..0b7f3c90728 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -268,6 +268,57 @@ dwarf_expr_context::read_mem (gdb_byte *buf, CORE_ADDR addr, read_memory (addr, buf, length); } +/* See expr.h. */ + +void +dwarf_expr_context::push_dwarf_reg_entry_value + (enum call_site_parameter_kind kind, + union call_site_parameter_u kind_u, + int deref_size) +{ + ensure_have_per_cu (per_cu, "DW_OP_entry_value"); + ensure_have_frame (frame, "DW_OP_entry_value"); + + dwarf2_per_cu_data *caller_per_cu; + dwarf2_per_objfile *caller_per_objfile; + struct frame_info *caller_frame = get_prev_frame (frame); + struct call_site_parameter *parameter + = dwarf_expr_reg_to_entry_parameter (frame, kind, kind_u, + &caller_per_cu, + &caller_per_objfile); + const gdb_byte *data_src + = deref_size == -1 ? parameter->value : parameter->data_value; + size_t size + = deref_size == -1 ? parameter->value_size : parameter->data_value_size; + + /* DEREF_SIZE size is not verified here. */ + if (data_src == NULL) + throw_error (NO_ENTRY_VALUE_ERROR, + _("Cannot resolve DW_AT_call_data_value")); + + /* We are about to evaluate an expression in the context of the caller + of the current frame. This evaluation context may be different from + the current (callee's) context), so temporarily set the caller's context. + + It is possible for the caller to be from a different objfile from the + callee if the call is made through a function pointer. */ + scoped_restore save_frame = make_scoped_restore (&this->frame, + caller_frame); + scoped_restore save_per_cu = make_scoped_restore (&this->per_cu, + caller_per_cu); + scoped_restore save_obj_addr = make_scoped_restore (&this->obj_address, + (CORE_ADDR) 0); + scoped_restore save_per_objfile = make_scoped_restore (&this->per_objfile, + caller_per_objfile); + + scoped_restore save_arch = make_scoped_restore (&this->gdbarch); + this->gdbarch = this->per_objfile->objfile->arch (); + scoped_restore save_addr_size = make_scoped_restore (&this->addr_size); + this->addr_size = this->per_cu->addr_size (); + + this->eval (data_src, size); +} + /* Require that TYPE be an integral type; throw an exception if not. */ static void diff --git a/gdb/dwarf2/expr.h b/gdb/dwarf2/expr.h index 713bdd94f27..09fec0b871e 100644 --- a/gdb/dwarf2/expr.h +++ b/gdb/dwarf2/expr.h @@ -198,14 +198,6 @@ struct dwarf_expr_context /* Read LENGTH bytes at ADDR into BUF. */ virtual void read_mem (gdb_byte *buf, CORE_ADDR addr, size_t length); - /* Push on DWARF stack an entry evaluated for DW_TAG_call_site's - parameter matching KIND and KIND_U at the caller of specified BATON. - If DEREF_SIZE is not -1 then use DW_AT_call_data_value instead of - DW_AT_call_value. */ - virtual void push_dwarf_reg_entry_value (enum call_site_parameter_kind kind, - union call_site_parameter_u kind_u, - int deref_size) = 0; - /* Return the `object address' for DW_OP_push_object_address. */ virtual CORE_ADDR get_object_address () { @@ -245,6 +237,14 @@ struct dwarf_expr_context STACK while it being passed to and returned from the called DWARF subroutine. */ void dwarf_call (cu_offset die_cu_off); + + /* Push on DWARF stack an entry evaluated for DW_TAG_call_site's + parameter matching KIND and KIND_U at the caller of specified BATON. + If DEREF_SIZE is not -1 then use DW_AT_call_data_value instead of + DW_AT_call_value. */ + void push_dwarf_reg_entry_value (enum call_site_parameter_kind kind, + union call_site_parameter_u kind_u, + int deref_size); }; /* Return the value of register number REG (a DWARF register number), diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c index ce95a811abd..abbd24b8ed0 100644 --- a/gdb/dwarf2/frame.c +++ b/gdb/dwarf2/frame.c @@ -231,13 +231,6 @@ class dwarf_expr_executor : public dwarf_expr_context : dwarf_expr_context (per_objfile) {} - void push_dwarf_reg_entry_value (enum call_site_parameter_kind kind, - union call_site_parameter_u kind_u, - int deref_size) override - { - invalid ("DW_OP_entry_value"); - } - private: void invalid (const char *op) ATTRIBUTE_NORETURN diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index 9c4872436d7..1779241d9dc 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -52,13 +52,6 @@ static struct value *dwarf2_evaluate_loc_desc_full size_t size, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, struct type *subobj_type, LONGEST subobj_byte_offset); -static struct call_site_parameter *dwarf_expr_reg_to_entry_parameter - (struct frame_info *frame, - enum call_site_parameter_kind kind, - union call_site_parameter_u kind_u, - dwarf2_per_cu_data **per_cu_return, - dwarf2_per_objfile **per_objfile_return); - static struct value *indirect_synthetic_pointer (sect_offset die, LONGEST byte_offset, dwarf2_per_cu_data *per_cu, @@ -631,61 +624,6 @@ class dwarf_evaluate_loc_desc : public dwarf_expr_context dwarf_evaluate_loc_desc (dwarf2_per_objfile *per_objfile) : dwarf_expr_context (per_objfile) {} - - /* Execute DWARF block of call_site_parameter which matches KIND and - KIND_U. Choose DEREF_SIZE value of that parameter. Search - caller of this objects's frame. - - The caller can be from a different CU - per_cu_dwarf_call - implementation can be more simple as it does not support cross-CU - DWARF executions. */ - - void push_dwarf_reg_entry_value (enum call_site_parameter_kind kind, - union call_site_parameter_u kind_u, - int deref_size) override - { - struct frame_info *caller_frame; - dwarf2_per_cu_data *caller_per_cu; - dwarf2_per_objfile *caller_per_objfile; - struct call_site_parameter *parameter; - const gdb_byte *data_src; - size_t size; - - caller_frame = get_prev_frame (frame); - - parameter = dwarf_expr_reg_to_entry_parameter (frame, kind, kind_u, - &caller_per_cu, - &caller_per_objfile); - data_src = deref_size == -1 ? parameter->value : parameter->data_value; - size = deref_size == -1 ? parameter->value_size : parameter->data_value_size; - - /* DEREF_SIZE size is not verified here. */ - if (data_src == NULL) - throw_error (NO_ENTRY_VALUE_ERROR, - _("Cannot resolve DW_AT_call_data_value")); - - /* We are about to evaluate an expression in the context of the caller - of the current frame. This evaluation context may be different from - the current (callee's) context), so temporarily set the caller's context. - - It is possible for the caller to be from a different objfile from the - callee if the call is made through a function pointer. */ - scoped_restore save_frame = make_scoped_restore (&this->frame, - caller_frame); - scoped_restore save_per_cu = make_scoped_restore (&this->per_cu, - caller_per_cu); - scoped_restore save_obj_addr = make_scoped_restore (&this->obj_address, - (CORE_ADDR) 0); - scoped_restore save_per_objfile = make_scoped_restore (&this->per_objfile, - caller_per_objfile); - - scoped_restore save_arch = make_scoped_restore (&this->gdbarch); - this->gdbarch = this->per_objfile->objfile->arch (); - scoped_restore save_addr_size = make_scoped_restore (&this->addr_size); - this->addr_size = this->per_cu->addr_size (); - - this->eval (data_src, size); - } }; /* See dwarf2loc.h. */ @@ -1166,13 +1104,9 @@ call_site_parameter_matches (struct call_site_parameter *parameter, return 0; } -/* Fetch call_site_parameter from caller matching KIND and KIND_U. - FRAME is for callee. - - Function always returns non-NULL, it throws NO_ENTRY_VALUE_ERROR - otherwise. */ +/* See loc.h. */ -static struct call_site_parameter * +struct call_site_parameter * dwarf_expr_reg_to_entry_parameter (struct frame_info *frame, enum call_site_parameter_kind kind, union call_site_parameter_u kind_u, diff --git a/gdb/dwarf2/loc.h b/gdb/dwarf2/loc.h index a729b370e2e..baee63ffccb 100644 --- a/gdb/dwarf2/loc.h +++ b/gdb/dwarf2/loc.h @@ -61,6 +61,20 @@ struct value *sect_variable_value (sect_offset sect_off, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile); +/* Fetch call_site_parameter from caller matching KIND and KIND_U. + FRAME is for callee. + + Function always returns non-NULL, it throws NO_ENTRY_VALUE_ERROR + otherwise. */ + +struct call_site_parameter *dwarf_expr_reg_to_entry_parameter + (struct frame_info *frame, + enum call_site_parameter_kind kind, + union call_site_parameter_u kind_u, + dwarf2_per_cu_data **per_cu_return, + dwarf2_per_objfile **per_objfile_return); + + /* Evaluate a location description, starting at DATA and with length SIZE, to find the current location of variable of TYPE in the context of FRAME. */ -- 2.17.1