From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2089.outbound.protection.outlook.com [40.107.93.89]) by sourceware.org (Postfix) with ESMTPS id BB1383858418 for ; Wed, 13 Jul 2022 07:40:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BB1383858418 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WQv0ocCMnZ09KG+aSc9pdR2TDBsUcxYC8FYOA85uDLqY8bGX5KXf/3Jdc75MKEhNMmJ6DcNDlp8GzCclqFxrfXp+8ZA5q02k8LLZ4NtNMw1HZ/DJ1OIJ+QuK09BQLEQLCbj8I+H14tBjDsrx/JDUPVl+S5jlxMcZPWPQ5+yBnedjK0J6ewzAAoqIE4NUVAgV8MabljQk2q6VlxQXiYu93kdl+daH96T5XPmA6W8r8+Uv6tVqvdYSrr2NQ72eZxAKDUMqzAokaUdS49+dN3TocwVWkgVfy/1vZJeDE1sAzn5qHJbdE6ubSbSwKyzaiyG1qmXn4hxgkxUpHVgWI/Af6A== 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=IW7ZO72n6vBEtldCRyQLN9tM88DJ8mN3NYDS2XAz1IE=; b=h5DrrvWNyiH0oElzEf6HBYLeo1R93e0VDRWgQdPgCrH6GlbKId/8rUmWUM351L/LBSxZVQwKDYZse2ahrYPx8rfNMH8UF4KcXcvo/htH2iFVLZawUtyap90i61e7MbDC7unrD2npm8vPLeis9iEmnvZhoweh0rqe52L77TAZZQOiBjEHzl1XDjvpo2R8yMYZAGiFU/3F3g6qSH5EfmIM6Ex7a8G4idqtNEBzKBTbKuznYsxe+x2jlc9hTg73IZ4Dor1g5ggL1nzltyVCDpebJmH3Vg2vFFtQbq18mXhadQJOVrKLOn/SICXNEWAs5Ep8gKahbsVVNWXy+Emif3HorQ== 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 BY5PR12MB4965.namprd12.prod.outlook.com (2603:10b6:a03:1c4::16) by BY5PR12MB3972.namprd12.prod.outlook.com (2603:10b6:a03:1a8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.20; Wed, 13 Jul 2022 07:39:58 +0000 Received: from BY5PR12MB4965.namprd12.prod.outlook.com ([fe80::e1bf:db35:5906:5bed]) by BY5PR12MB4965.namprd12.prod.outlook.com ([fe80::e1bf:db35:5906:5bed%9]) with mapi id 15.20.5417.026; Wed, 13 Jul 2022 07:39:58 +0000 From: "George, Jini Susan" To: Nils-Christian Kempke , "gdb-patches@sourceware.org" Subject: RE: [PATCH 1/3] gdb: add support for DW_AT_trampoline in DWARF reader Thread-Topic: [PATCH 1/3] gdb: add support for DW_AT_trampoline in DWARF reader Thread-Index: AQHYkftTANT9yFEwKk205k3J2GTj1a16xbwQ Date: Wed, 13 Jul 2022 07:39:57 +0000 Message-ID: References: <20220707121538.1317473-2-nils-christian.kempke@intel.com> In-Reply-To: <20220707121538.1317473-2-nils-christian.kempke@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ActionId=abb83dda-69d1-4673-96af-8660439988c6; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ContentBits=0; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Enabled=true; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Method=Privileged; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Name=Public-AIP 2.0; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SetDate=2022-07-13T07:30:18Z; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4259fa46-3524-446d-3b15-08da64a2e2e2 x-ms-traffictypediagnostic: BY5PR12MB3972:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: d2Lmu7kEdcNgnGbqGQgPumcwO2RFbHwJfDcLMTMYEcmJxMA3pgkrg/KQsbuy1myghzqiB/59xabpkq1gW8n8+ysVmNTTxpFamqpj8AmEjRDQsMgRLkKLyBkhe7BKxXkHmDESrE+Q4PubaQ6sgy39ACCerMpo+2UqeuRsSDsoN4w4V0gFpTSKL0OVRqBspa98gDUrl1A0pjT/pRYFzcIwFLB4+UzvSN/t3M08U85UZ00lLp+JWobT2yEFPVi3ydzbCVLLOlnP5Q7otPaenuydWXS+PKwv0s1NsIKEOtnflRSUcjRAGnaQ+FdQpMuxj1guC59iQ1aUkeGQZOfjdljSbhbqPuFa19W56n5eU3mzO3oY5VThliyA7g/To4J19wkdNs3f002M/+9UozAmdn/AVkuzauD+vZ4aY66Ko9cLF9PXFyi2U6d8tJmv9gPqlT0O/sQ0Jpf6h9moeE3/9MKdNY4euQLWfznxWl8omaQKqKM3LmyT8VS5AsxCMugy188c1qJeRo0KXnvrNHYnWuJ7sQpOQ8M+6J9IYns8CXE2qD/sFST7faTqAxITa5pD4+m2iO9R94MJHenvjyVjStGZGB+w3OtHQhfpsrKUwf0j6v5/4POy32u4/uE2z5RK7D9ablq29qKvw+UX+cM6FkLOYJs514sOhISju6xbPgDQTadOetp5PnrVB1o0Oky9WszuCH4V8isnW0SjbxdJD6xknR3riYza+nF4iGCWYN7dRTE2uTdJWUqry5q3pu3Beob/4RBkGwW5vLZKpYCicHPx8XIeX+epxp1Fl+zLbQB9OmmgDXDR/1k7FuQrBim8gNyR3H7dPoDIzZhcvbGRH7GZfw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4965.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(376002)(346002)(396003)(39860400002)(366004)(136003)(478600001)(110136005)(83380400001)(86362001)(45080400002)(38070700005)(122000001)(71200400001)(7696005)(316002)(41300700001)(6506007)(55016003)(76116006)(9686003)(66946007)(64756008)(30864003)(66446008)(33656002)(66476007)(66556008)(8936002)(8676002)(2906002)(26005)(186003)(5660300002)(52536014)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?G9nNSpQpcxx9BDIgseHh2Kd70aefjMfo09KOCB17Na997CJQM/zCTdP/OkmE?= =?us-ascii?Q?E80llRR2L3DLoOgEHlbXkN59Hk+HYV8d1fChohYMjKYUFadUc/Cu2jBWUsrj?= =?us-ascii?Q?P2tnh5+G3T+LBSMKe0D8jpqkJ3qW4ik441ok4meaQ1MFAuB9BN5xXYxKSx4M?= =?us-ascii?Q?vtoOXyodxvUY2suj5R2wbSxhaW4wxCp95QrFmQ9O8GUCxxI1YmHKWGRCsigw?= =?us-ascii?Q?7x/2MOTEr25pqCaH1la/hpopmbvUriGKODRm8tGcSt901kCMQyPAP9tBOcss?= =?us-ascii?Q?Ydxf2o9Xe7hjwgm3Psj4jULCNRyHTtGXXag/chuHVUmfGulTDQvgGFu2X47Z?= =?us-ascii?Q?gcmuaryIXE5tN3tZTJtm8lEe3sq0nQOlppF/TGmYjvcFkqf7F5Lq34E7tt3G?= =?us-ascii?Q?cfO+aAu4Uojloh+hB783Yqa0l6NIyGJPTvT5WI3xm0CoXzVK8mIbeeQxmMTy?= =?us-ascii?Q?1RFGqddDgqApISbhZA+CqximnxuKRsUFeMJpqH/Ee1TA5+iKnxSEwlFC6Nfd?= =?us-ascii?Q?YdwCazK7Ee2yJeWd1eP745GLeHfaTQx7nWTvY2hm0LL3XezLBGx+ot72ZAFj?= =?us-ascii?Q?YxUNXyh6A/jAajLz+YsRh/6AQ6ippVMHCgRntZcGQb2VPmWlU/yJYUxh15HN?= =?us-ascii?Q?fD6ckrCT5qfu7PLIaBHVNr9Y5lSTQxe/rRewWlySaA0Zh8SqI6qxS9i0WQZ2?= =?us-ascii?Q?FLHoNukdQhY4bxzvrXG2D0Z09+SmrfDtSJ/ZSGTXzuGDSgtRnghr+PIw2TUD?= =?us-ascii?Q?+ER0IqRdndl/gdybwHoY3GaoibX+U0z3tmx1PL1p4Y0K4L64PAYaZ+1X57DO?= =?us-ascii?Q?9ibNw8Wq5+9srWqsrPWfVm9xddBWVdS7Pz5ocXAixtBIhoWr1eV1T3oE/rY8?= =?us-ascii?Q?ZlTy3sKn3VmZHuNuIojowYDaaWwO31K3quh6drVL8tC83+GFHIL9XCi6vhXl?= =?us-ascii?Q?kZk7KdkcIwUwTv3pNNNLwD1UhsHdxmh98FbUId8jtAMYHKgufjdr78FFGKKf?= =?us-ascii?Q?77wsGr/si8xg0Loj/vjkBxgJ5A6/k7lhXO3P2meqcmtiwq7GZgg+1erBZE09?= =?us-ascii?Q?iwoA9L4MlpeGRy3vnjplEsLNZyuMz+akW0zBWZHZeWp+u59nHLhtXE532yza?= =?us-ascii?Q?LUvH8tCVukOi/iMf8GKzRgl8qv3wKmWtzHUsh+xIV+7K+ZrfL2eY4EaiFdwZ?= =?us-ascii?Q?qBlmbOrqo8+u/4Uko870C+ZrTP+1KtlPKBH3Mg6q5ocODsvTIUzLovHEoTku?= =?us-ascii?Q?EWNyPfk77jKcRDmEPr1PsA65ISgrnRbqiXMya72qKXJphLUEktVSPiUkcdZd?= =?us-ascii?Q?4CFArU6AzeQh1hL93Xh9h48YLrMn6w21l6MqbuUKopb7vp17wbSEXJfK5jYj?= =?us-ascii?Q?W79vzAzWRd4RBaPmIaDN8tKX2dDBt6HIjzSDS9y2gPwZq1aTTvr44zP1Conx?= =?us-ascii?Q?TXMsPZ6OM60gl1EkIQmyPAnbdG6rYEwKZtwMSy+e6wr79Im3vHGbygJI6AN7?= =?us-ascii?Q?rBK1QAorh1qXBDPmDGZfr+26URNNPSUfL90by7H2D8o4mFnu8vR1Dat2AVjl?= =?us-ascii?Q?0rdFp3pCZBwaTG+enzT99f/i16FvoZAwOaSlGBTQ?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4965.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4259fa46-3524-446d-3b15-08da64a2e2e2 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2022 07:39:58.0146 (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: n2Yt6eS2V3CgUdzK5F4nLiEEoY/WJZY3Z+kQ2ZNGNupDv2mhr6W87tf9WwbZv8uvc0h6d7birhXAaXlto9VDqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3972 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2022 07:40:06 -0000 [Public] Hi Nils, Thanks for this. A few questions/ comments. * Is there any common ground we can find with the way solib (linker PLT) tr= ampolines are handled ? I am OK if we can't, but I think it might be better= to check and rule it out. * Also, do we want to resolve and display the target of the trampoline code= (if possible) in the disassembled code also ? * Also, do we want to refer to these trampolines differently so that these = can be distinguished from the linker PLT trampolines and the signal trampol= ines ? * In read.c, in read_subroutine_type(), where the DW_AT_trampoline attribut= e is of form reference, we seem to be storing the value corresponding to th= e DW_AT_name attribute, whereas in many cases (C++ and other languages), i= t might make sense to store the mangled name typically obtained from the DW= _AT_linkage_name attribute. Given this it might be good to have a C++ test = case for this with trampoline target functions inside namespaces also. Mayb= e with the same target function name under multiple namespaces. Also, the c= omment in gdbtypes.h (Line 1883) mentions mangled name, which does not seem= to match ? * In gdbtypes.h: 1817 1818 unsigned int is_trampoline : 1; Might be better to position this field as the 3rd field for better structur= e packing ? * infrun.c: Line 7156: It might be better to have the '10' representing the= number of chained trampoline traversals allowed as a macro. A few nits below: * infrun.c : Nits: Line 7154: spelling: certian Line 9941: spelling : fucntion *symtab.h: Nit: line 2247: spelling: wether Thanks, Jini. >>-----Original Message----- >>From: Gdb-patches >bounces+jigeorge=3Damd.com@sourceware.org> On Behalf Of Nils-Christian >>Kempke via Gdb-patches >>Sent: Thursday, July 7, 2022 5:46 PM >>To: gdb-patches@sourceware.org >>Subject: [PATCH 1/3] gdb: add support for DW_AT_trampoline in DWARF reade= r >> >>[CAUTION: External Email] >> >>DW_AT_trampoline can be used to describe compiler generated functions tha= t >>serve some intermediary purpose on making a call to another function. A >>compiler can emit this tag in order to help a debugger hide the trampolin= es from >>a user. >> >>The attribute is only applicable to DW_TAG_subroutine and >>DW_TAG_inlined_subroutines tags. It contains information about the >>trampoline target either as a reference to its DIE, as its address or its= name. >>DW_AT_trampoline can also be a flag indicating that the DIE is a trampoli= ne or >>not but not specifying the target if it is unknown. >> >>This patch adds support to GDB for reading the DW_AT_trampoline attribute= . It >>stores the attribute and its value in the type_specific part of a GDB typ= e. This >>patch is done in preparation of the following patches which will add a >>mechanism to hide DW_AT_trampoline subroutines from the user. >> >>gdb/ChangeLog: >>2022-05-22 Nils-Christian Kempke >> >> * dwarf2/read.c (read_subroutine_type): Read in DW_AT_trampoline. >> * gdbtypes.c (print_trampoline_target_info): New helper method. >> (recursive_dump_type): Add trampoline info. >> (copy_type_recursive): Copy trampoline info. >> * gdbtypes.h (func_type): Add trampoline specific fields. >> (trampoline_target_kind): New enum. >> (trampoline_target): New struct for storing DW_AT_trampoline's >> value. >> (TYPE_IS_TRAMPOLINE): New define. >> (TYPE_TRAMPOLINE_TARGET): New define. >> >>Signed-off-by: Nils-Christian Kempke >>--- >> gdb/dwarf2/read.c | 43 ++++++++++++++++++++++++++ >> gdb/gdbtypes.c | 31 +++++++++++++++++++ >> gdb/gdbtypes.h | 79 >>+++++++++++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 153 insertions(+) >> >>diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index >>23fe5679cbd..7f80c31d051 100644 >>--- a/gdb/dwarf2/read.c >>+++ b/gdb/dwarf2/read.c >>@@ -16491,6 +16491,49 @@ read_subroutine_type (struct die_info *die, stru= ct >>dwarf2_cu *cu) >> if (prototyped_function_p (die, cu)) >> ftype->set_is_prototyped (true); >> >>+ /* If this is a trampoline function store it and its target here. */ >>+ attr =3D dwarf2_attr (die, DW_AT_trampoline, cu); if (attr !=3D nullpt= r) >>+ { >>+ CORE_ADDR baseaddr =3D objfile->text_section_offset (); >>+ >>+ TYPE_IS_TRAMPOLINE (ftype) =3D true; >>+ TYPE_TRAMPOLINE_TARGET (ftype) >>+ =3D (trampoline_target *) TYPE_ZALLOC (ftype, >>+ sizeof >>+ (trampoline_target)); >>+ >>+ /* A DW_AT_trampoline can be either an address, a flag, a referenc= e or a >>+ string. */ >>+ if (attr->form_is_string ()) >>+ TYPE_TRAMPOLINE_TARGET (ftype)->set_target_physname >>+ (attr->as_string ()); >>+ else if (attr->form_is_ref ()) >>+ { >>+ die_info *target_die; >>+ dwarf2_cu *target_cu =3D cu; >>+ >>+ target_die =3D follow_die_ref (die, attr, &target_cu); >>+ const char* target_name =3D dwarf2_name (target_die, target_cu)= ; >>+ if (target_name =3D=3D nullptr) >>+ { >>+ complaint (_("DW_AT_trampoline target DIE has no name for" >>+ "referencing DIE %s [in module %s]"), >>+ sect_offset_str (die->sect_off), >>+ objfile_name (objfile)); >>+ } >>+ TYPE_TRAMPOLINE_TARGET (ftype)->set_target_physname >>(target_name); >>+ } >>+ else if (attr->form_is_unsigned ()) >>+ TYPE_TRAMPOLINE_TARGET (ftype)->set_target_flag (attr->as_boolean= ()); >>+ else >>+ { >>+ CORE_ADDR target_addr =3D attr->as_address (); >>+ target_addr =3D gdbarch_adjust_dwarf2_addr (objfile->arch (), >>+ target_addr + baseadd= r); >>+ TYPE_TRAMPOLINE_TARGET (ftype)->set_target_physaddr (target_add= r); >>+ } >>+ } >>+ >> /* Store the calling convention in the type if it's available in >> the subroutine die. Otherwise set the calling convention to >> the default value DW_CC_normal. */ diff --git a/gdb/gdbtypes.c >>b/gdb/gdbtypes.c index c8f98554859..66e04882d48 100644 >>--- a/gdb/gdbtypes.c >>+++ b/gdb/gdbtypes.c >>@@ -5205,6 +5205,31 @@ print_fixed_point_type_info (struct type *type, in= t >>spaces) >> type->fixed_point_scaling_factor ().str ().c_str ()); } >> >>+/* Print the contents of the TYPE's self_trampoline_target, assuming tha= t its >>+ type-specific kind is TYPE_SPECIFIC_FUNC and is_trampoline is not 0. >>+*/ static void print_trampoline_target_info (struct type *type, int >>+spaces) { >>+ switch (TYPE_TRAMPOLINE_TARGET (type)->target_kind ()) >>+ { >>+ case TRAMPOLINE_TARGET_PHYSADDR: >>+ gdb_printf ("%*starget physaddr: 0x%lx\n", spaces + 2, "", >>+ TYPE_TRAMPOLINE_TARGET (type)->target_physaddr ()); >>+ break; >>+ case TRAMPOLINE_TARGET_PHYSNAME: >>+ gdb_printf ("%*starget physname: %s\n", spaces + 2, "", >>+ TYPE_TRAMPOLINE_TARGET (type)->target_physname ()); >>+ break; >>+ case TRAMPOLINE_TARGET_FLAG: >>+ gdb_printf ("%*starget flag: %d\n", spaces + 2, "", >>+ TYPE_TRAMPOLINE_TARGET (type)->target_flag ()); >>+ break; >>+ default: >>+ gdb_assert_not_reached ("unhandled trampoline target kind"); >>+ break; >>+ } >>+} >>+ >> static struct obstack dont_print_type_obstack; >> >> /* Print the dynamic_prop PROP. */ >>@@ -5531,6 +5556,10 @@ recursive_dump_type (struct type *type, int spaces= ) >> gdb_printf ("%*scalling_convention %d\n", spaces, "", >> TYPE_CALLING_CONVENTION (type)); >> /* tail_call_list is not printed. */ >>+ gdb_printf ("%*sis_trampoline %d\n", spaces, "", >>+ TYPE_IS_TRAMPOLINE (type)); >>+ if (TYPE_IS_TRAMPOLINE (type)) >>+ print_trampoline_target_info (type, spaces); >> break; >> >> case TYPE_SPECIFIC_SELF_TYPE: >>@@ -5762,6 +5791,8 @@ copy_type_recursive (struct objfile *objfile, >> TYPE_CALLING_CONVENTION (new_type) =3D TYPE_CALLING_CONVENTION >>(type); >> TYPE_NO_RETURN (new_type) =3D TYPE_NO_RETURN (type); >> TYPE_TAIL_CALL_LIST (new_type) =3D NULL; >>+ TYPE_IS_TRAMPOLINE (new_type) =3D TYPE_IS_TRAMPOLINE (type); >>+ TYPE_TRAMPOLINE_TARGET (new_type) =3D TYPE_TRAMPOLINE_TARGET >>+ (type); >> break; >> case TYPE_SPECIFIC_FLOATFORMAT: >> TYPE_FLOATFORMAT (new_type) =3D TYPE_FLOATFORMAT (type); diff --gi= t >>a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 7437e1db8ab..846de1289ad 100644 >>--- a/gdb/gdbtypes.h >>+++ b/gdb/gdbtypes.h >>@@ -1811,6 +1811,83 @@ struct func_type >> contains the method. */ >> >> struct type *self_type; >>+ >>+ /* * For functions marked with the DW_AT_trampoline. These are >>+ compiler generated wrappers that should be hidden from the user. >>+ */ >>+ >>+ unsigned int is_trampoline : 1; >>+ >>+ struct trampoline_target *self_trampoline_target; }; >>+ >>+/* The kind of location held by this call site target. */ enum >>+trampoline_target_kind >>+ { >>+ /* An address. */ >>+ TRAMPOLINE_TARGET_PHYSADDR, >>+ /* A (mangled) name. */ >>+ TRAMPOLINE_TARGET_PHYSNAME, >>+ /* An flag (target is unknown). */ >>+ TRAMPOLINE_TARGET_FLAG, >>+ }; >>+ >>+struct trampoline_target >>+ { >>+ trampoline_target_kind target_kind () const >>+ { >>+ return m_target_kind; >>+ } >>+ >>+ void set_target_physaddr (CORE_ADDR physaddr) >>+ { >>+ m_target_kind =3D TRAMPOLINE_TARGET_PHYSADDR; >>+ m_trampoline_target.physaddr =3D physaddr; >>+ } >>+ >>+ CORE_ADDR target_physaddr () const >>+ { >>+ gdb_assert (m_target_kind =3D=3D TRAMPOLINE_TARGET_PHYSADDR); >>+ return m_trampoline_target.physaddr; >>+ } >>+ >>+ void set_target_physname (const char *physname) >>+ { >>+ m_target_kind =3D TRAMPOLINE_TARGET_PHYSNAME; >>+ m_trampoline_target.physname =3D physname; >>+ } >>+ >>+ const char *target_physname () const >>+ { >>+ gdb_assert (m_target_kind =3D=3D TRAMPOLINE_TARGET_PHYSNAME); >>+ return m_trampoline_target.physname; >>+ } >>+ >>+ void set_target_flag (bool flag) >>+ { >>+ m_target_kind =3D TRAMPOLINE_TARGET_FLAG; >>+ m_trampoline_target.flag =3D flag; >>+ } >>+ >>+ bool target_flag () const >>+ { >>+ gdb_assert (m_target_kind =3D=3D TRAMPOLINE_TARGET_FLAG); >>+ return m_trampoline_target.flag; >>+ } >>+ >>+ private: >>+ >>+ union >>+ { >>+ /* Address. */ >>+ CORE_ADDR physaddr; >>+ /* Mangled name. */ >>+ const char *physname; >>+ /* Flag. */ >>+ bool flag; >>+ } m_trampoline_target; >>+ >>+ /* * Discriminant for union m_trampoline_target. */ >>+ ENUM_BITFIELD (trampoline_target_kind) m_target_kind : 2; >> }; >> >> /* struct call_site_parameter can be referenced in callees by several wa= ys. */ >>@@ -2172,6 +2249,8 @@ extern void set_type_vptr_basetype (struct type *, >>struct type *); #define TYPE_CALLING_CONVENTION(thistype) >>TYPE_MAIN_TYPE(thistype)->type_specific.func_stuff->calling_convention >> #define TYPE_NO_RETURN(thistype) TYPE_MAIN_TYPE(thistype)- >>>type_specific.func_stuff->is_noreturn >> #define TYPE_TAIL_CALL_LIST(thistype) TYPE_MAIN_TYPE(thistype)- >>>type_specific.func_stuff->tail_call_list >>+#define TYPE_IS_TRAMPOLINE(thistype) >>+TYPE_MAIN_TYPE(thistype)->type_specific.func_stuff->is_trampoline >>+#define TYPE_TRAMPOLINE_TARGET(thistype) >>+TYPE_MAIN_TYPE(thistype)->type_specific.func_stuff->self_trampoline_tar >>+get >> #define TYPE_BASECLASS(thistype,index) ((thistype)->field (index).type (= )) >>#define TYPE_N_BASECLASSES(thistype) TYPE_CPLUS_SPECIFIC(thistype)- >>>n_baseclasses >> #define TYPE_BASECLASS_NAME(thistype,index) (thistype->field (index).nam= e ()) >>-- >>2.25.1 >> >>Intel Deutschland GmbH >>Registered Address: Am Campeon 10, 85579 Neubiberg, Germany >>Tel: +49 89 99 8853-0, >>https://nam11.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fwww.in= t >>el.de%2F&data=3D05%7C01%7CJiniSusan.George%40amd.com%7C9c3f28b5 >>98cf49f888f908da601272a0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7 >>C0%7C637927929632561872%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj >>AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C >>%7C&sdata=3DMBaQ7XpSZ4XFO963dnxF%2Fy1PD0gcx6k%2FjdaifxoSUaY%3D >>&reserved=3D0 >>>tel.de%2F&data=3D05%7C01%7CJiniSusan.George%40amd.com%7C9c3f28b5 >>98cf49f888f908da601272a0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7 >>C0%7C637927929632561872%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj >>AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C >>%7C&sdata=3DMBaQ7XpSZ4XFO963dnxF%2Fy1PD0gcx6k%2FjdaifxoSUaY%3D >>&reserved=3D0> >>Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva >>Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munic= h >>Commercial Register: Amtsgericht Muenchen HRB 186928