From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57962 invoked by alias); 5 Aug 2019 10:59:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 57953 invoked by uid 89); 5 Aug 2019 10:59:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-eopbgr150050.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (40.107.15.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Aug 2019 10:59:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i3iNHD03kEWdGw463/MjJtxrFm7+G71kU5njSMeXgLM=; b=AChcOHvQ7F74x4TfQkDM1iY5UQkLvmXkP6KRH2zL6TLR8x3Zi+IfrfkYYnB4L9iHCiMy9Y9IDOh2nm4mbM6lqS1YiHtAefBb8AraoFskVPldqWyzJ0M4cFhEoQZw1Rpo0KmL/1RR7jq7gWDhWu+51x2gKJtgUTMLVoccYLdiBws= Received: from VI1PR0802CA0001.eurprd08.prod.outlook.com (2603:10a6:800:aa::11) by AM0PR08MB4945.eurprd08.prod.outlook.com (2603:10a6:208:157::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.14; Mon, 5 Aug 2019 10:59:04 +0000 Received: from VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::202) by VI1PR0802CA0001.outlook.office365.com (2603:10a6:800:aa::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.14 via Frontend Transport; Mon, 5 Aug 2019 10:59:04 +0000 Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT034.mail.protection.outlook.com (10.152.18.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18 via Frontend Transport; Mon, 5 Aug 2019 10:59:02 +0000 Received: ("Tessian outbound 6d016ca6b65d:v26"); Mon, 05 Aug 2019 10:59:00 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4f9c5de70c81c79b X-CR-MTA-TID: 64aa7808 Received: from 3434db6af56a.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.0.59]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6BC9BB22-B4ED-4B51-AC82-4063EB99395A.1; Mon, 05 Aug 2019 10:58:55 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2059.outbound.protection.outlook.com [104.47.0.59]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3434db6af56a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 05 Aug 2019 10:58:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CobqrqvYczGBVsVHEznqj/BKoq8t1UT0Uuhi2/UDxxgW0NW+Ow7ZbTP/kzx3C5QO3rmZP8VW7LICgCIhDvLdOFoAsMQoB076kxbvrBJz9nbXyUrEve07KjeeI7knSncsSAWqjzLw0bMUGLZG1AnLc8ruWO7RH5cRaBtyyc0lzmmqZ3huQ5lQrIwInZ5L4MJFbit2j3Ue1Z8cGKPnTbA6YnqAlmw1u7/tWxvXAUUt+oyFJWobBSktcgeeVtlsOTURpKw/IwNHiXF//d4CswEyFqh33ea3tBOpQqt0VtzyBmdKACvQgf/+rCZ6FM+iETnWSRs4yZCZvYeT66VMgq0olA== 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=i3iNHD03kEWdGw463/MjJtxrFm7+G71kU5njSMeXgLM=; b=DmbaAggW/yyjQZPI6tQcMSwjIKqR6ZWEUMAK7by8juIqlqhyCZNSs+XfOH6iBtxJePVu8cUwIrvXMyxowp7zj1hG7lxcztTCr9rtPC6KUft5eRuYcCVrE8KkRM6aAvv8Wf2qaMZ7fnqWmnHNYuJCoMGCM2932BVJQWJoNYO06ZbU1Do/Bvmp4BNtOhpjji4ORmYtx3rZnab9a48+0DGfvFNTEEPXRgrAbf2VZqqWHh6JLgZn5rSwl2VgYO2y/0ooZEIWeSnWViDGumgNIygN9UyjtI2GaT34Ca9k8sugus1N4R8qGGd27Ii9WcfpZmm4woHtSEIirtnkdBJXw7M6pw== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=arm.com;dmarc=pass action=none header.from=arm.com;dkim=pass header.d=arm.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i3iNHD03kEWdGw463/MjJtxrFm7+G71kU5njSMeXgLM=; b=AChcOHvQ7F74x4TfQkDM1iY5UQkLvmXkP6KRH2zL6TLR8x3Zi+IfrfkYYnB4L9iHCiMy9Y9IDOh2nm4mbM6lqS1YiHtAefBb8AraoFskVPldqWyzJ0M4cFhEoQZw1Rpo0KmL/1RR7jq7gWDhWu+51x2gKJtgUTMLVoccYLdiBws= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.227.22) by DB6PR0802MB2262.eurprd08.prod.outlook.com (10.172.227.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.14; Mon, 5 Aug 2019 10:58:53 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::5ce5:cf42:42dd:eda1]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::5ce5:cf42:42dd:eda1%6]) with mapi id 15.20.2136.018; Mon, 5 Aug 2019 10:58:53 +0000 From: Alan Hayward To: Tom de Vries CC: Pedro Alves , Andrew Burgess , "gdb-patches@sourceware.org" , nd Subject: Re: [8.3 backport] Supress SIGTTOU when handling errors Date: Mon, 05 Aug 2019 10:59:00 -0000 Message-ID: <64430CB3-E213-4EA4-8A73-B67D41DC6692@arm.com> References: <20190516155150.71826-1-alan.hayward@arm.com> <20190516180640.GS2568@embecosm.com> <3935437B-CD4F-4474-B84A-05859CE822DF@arm.com> <7483f478-44d2-b2ce-b0cb-3e984054305a@redhat.com> <20190526224253.GA5667@embecosm.com> <4e3c7da9-ac41-f3d5-edb6-3dbb2f4e1f3e@redhat.com> <73EE75AA-7C1D-41E1-A419-B204ED82B814@arm.com> <507d074a-75ef-b3b1-f5f5-7230ded52685@suse.de> In-Reply-To: <507d074a-75ef-b3b1-f5f5-7230ded52685@suse.de> Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:DB6PR0802MB2262; x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(366004)(136003)(39860400002)(396003)(346002)(376002)(199004)(189003)(478600001)(66066001)(8676002)(81156014)(71190400001)(316002)(8936002)(229853002)(6436002)(50226002)(99286004)(3846002)(14454004)(486006)(186003)(26005)(102836004)(5660300002)(76176011)(53546011)(6506007)(33656002)(81166006)(71200400001)(57306001)(476003)(4744005)(11346002)(6486002)(54906003)(6116002)(2906002)(2616005)(6512007)(68736007)(4326008)(6246003)(53936002)(25786009)(6916009)(446003)(7736002)(256004)(305945005)(36756003)(66946007)(91956017)(66476007)(64756008)(66446008)(86362001)(66556008)(76116006);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2262;H:DB6PR0802MB2133.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: Emc/OIB0AtXreKBdX24s49VQb314KVUOdeeTji0DDLxM84mYHgGjocEwk9uUmq8RPJST5g2VxzUlJ0sBVgTiLEamLkmEHRTy5GUoFVs/88RvrtEzDH8V0n8rmfGf+Blpwvcln5DUtyPMV2T1lwUiKDj1hfOzeLymGgy9nnM0T/mSEGZ2ofyEz/MGPgmdqJWLobyJ+31jdo/itq6tOvDENoFfcVqeAbJanmwcNb0+yirJrWQwY6LIp3haNKvHJRjoL4IGalmhjEpLWXDDG9aOJRDO426Rh3vA3UOgi+JnxU+W7YaXhKbGMyhg1306msRbyU+G94mBQJOCwrMMR8gNH79y/EtwRx0sTaFLBQPKyOP7pwBucGVCjJJHztDMHl0OqGIgmR618NCOiZxLw9VuM24AXy9D6S2salYibu9wQU4= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; Return-Path: Alan.Hayward@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 11126945-50f8-432c-bb0c-08d71993e7ef X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00105.txt.bz2 DQoNCj4gT24gMiBBdWcgMjAxOSwgYXQgMTc6MDUsIFRvbSBkZSBWcmllcyA8 dGRldnJpZXNAc3VzZS5kZT4gd3JvdGU6DQo+IA0KPiBPbiAyOC0wNS0xOSAx MTozOSwgQWxhbiBIYXl3YXJkIHdyb3RlOg0KPj4gDQo+PiANCj4+PiBPbiAy NyBNYXkgMjAxOSwgYXQgMTk6MDMsIFBlZHJvIEFsdmVzIDxwYWx2ZXNAcmVk aGF0LmNvbT4gd3JvdGU6DQo+Pj4gDQo+Pj4gT24gNS8yNi8xOSAxMTo0MiBQ TSwgQW5kcmV3IEJ1cmdlc3Mgd3JvdGU6DQo+Pj4+ICogQWxhbiBIYXl3YXJk IDxBbGFuLkhheXdhcmRAYXJtLmNvbT4gWzIwMTktMDUtMjQgMTI6MzY6NDMg KzAwMDBdOg0KPj4+PiANCj4+PiANCj4+Pj4+IE9rLCBhZ3JlZWQuDQo+Pj4+ PiANCj4+Pj4+IEFueSBvYmplY3Rpb25zIHRvIG1lIHB1c2hpbmcgdGhlIG9y aWdpbmFsIHBhdGNoIHRoZW4/DQo+Pj4+IA0KPj4+PiBOb3QgZnJvbSBtZS4N Cj4+Pj4gDQo+Pj4+IFNvcnJ5IGZvciBhbnkgZGVsYXkgSSBjYXVzZWQgaW4g Z2V0dGluZyB0aGUgcGF0Y2ggbWVyZ2VkLg0KPj4+IA0KPj4+IE5vdCBhdCBh bGwuICBJdCB3YXMgYW4gaW50ZXJlc3RpbmcgZGlzY3Vzc2lvbiBhbmQgcmV2 ZWFsZWQgdGhhdCB3ZQ0KPj4+IG5lZWQgdG8gY2xlYW4gdXAgYW5kIGNsYXJp Znkgc29tZSBjb21tZW50cyBhdCBsZWFzdC4NCj4+PiANCj4+PiBUaGFua3Ms DQo+Pj4gUGVkcm8gQWx2ZXMNCj4+IA0KPj4gRGl0dG8gd2l0aCB3aGF0IFBl ZHJvIHNhaWQsIGFuZCBwdXNoZWQuDQo+PiANCj4gDQo+IEhpLA0KPiANCj4g T0sgdG8gYmFja3BvcnQgdG8gOC4zPw0KPiANCj4gVGhlIHBhdGNoIGFwcGxp ZXMgY2xlYW5seSwgYW5kIGNhdXNlcyBubyByZWdyZXNzaW9ucyBvbiB4ODZf NjQtbGludXguDQo+IA0KDQpJ4oCZdmUgZ290IG5vIGlzc3VlcyB3aXRoIHRo aXMgb25lIGVpdGhlciwgYnV0IGRvbuKAmXQgaGF2ZSB0aGUgcG93ZXJzIHRv IGFwcHJvdmUuDQoNCg0KPiBUaGFua3MsDQo+IC0gVG9tDQo+IA0KPiANCg0K >From gdb-patches-return-157969-listarch-gdb-patches=sources.redhat.com@sourceware.org Mon Aug 05 12:42:13 2019 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 43922 invoked by alias); 5 Aug 2019 12:42:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 43069 invoked by uid 89); 5 Aug 2019 12:42:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=bottom X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-eopbgr150070.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (40.107.15.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Aug 2019 12:42:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=o3kfTW5q1aDeYMqfcwU4i1kCaZusB0X5p+q1XazJ9Lc=; b=npjp+mX9fxnkf8C9dwmAmnYJQjG7OFaJVvZOy8cReyis01JqSlSiP2vCp4YGPtP17eTfZ/MXDdh851lfCNCUE/vUnis6Pz7HAEcX+pC1xc4CvcLX0cJp5nUREolMWINxPdT9AeMML3E52Tdc7GIhyDHmr5P03/NXpLOG29q5lXM= Received: from VI1PR08CA0127.eurprd08.prod.outlook.com (2603:10a6:800:d4::29) by AM6PR08MB4951.eurprd08.prod.outlook.com (2603:10a6:20b:e1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.17; Mon, 5 Aug 2019 12:42:04 +0000 Received: from DB5EUR03FT019.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::200) by VI1PR08CA0127.outlook.office365.com (2603:10a6:800:d4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2136.14 via Frontend Transport; Mon, 5 Aug 2019 12:42:03 +0000 Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT019.mail.protection.outlook.com (10.152.20.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Mon, 5 Aug 2019 12:42:02 +0000 Received: ("Tessian outbound 220137ab7b0b:v26"); Mon, 05 Aug 2019 12:42:02 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 15bf7e1f1566e322 X-CR-MTA-TID: 64aa7808 Received: from 93d6e8b1d718.2 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.6.57]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 098DDF18-5152-42BE-A68A-177F2119CEA1.1; Mon, 05 Aug 2019 12:41:56 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02lp2057.outbound.protection.outlook.com [104.47.6.57]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 93d6e8b1d718.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 05 Aug 2019 12:41:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D3O4AWlkVuZZ9m2k2qKjcXqmZh4kLTaysMVT3MgimFXF1b2N/q/Z8en1HNb7Z+oXN+m9u9/II2SZe25i88tC332TJHKMUDnEth/CLWvvcIggDXwvcOhWlOEJVrBGqegJ6EExvceI9TJJPCr//ztjeroRM6GLRxpkzb/0l39tk8FWMjyq7BMqHIXnoOG6HcIcvLD3PMzcGqIWrgCW3RoXOTxsqKoizKJOiotL5LwWCMRsOpQ+1QpbR7AB0zVlIo2zA9BXgW/fGHZ+w+x7KraqRgDibw3K86sqAdM5J6JXI05fPO0tcmbBqRANoClQkpZiIY3gvr+PRr/Wkj68ywWhAQ== 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=o3kfTW5q1aDeYMqfcwU4i1kCaZusB0X5p+q1XazJ9Lc=; b=VA5JwIOe/aCUmjz1A1MRvOeTQgx+BateeCASCsMm1ux/c1EDv/3GRg5WfY1+K7305uWL8kUMGjNikGeiuMjQkdmeAuf3R0p11vfU6FjKlPDvumHaAjb3X4TwwD6WZ9JRoa6LrpcJR5utCq/oTMrpRAoxF2hVCnY5ivu8us6RFU2vh7kf5tB3b0rw6f/e7/JQAe0GnrP2Fy2G8uwmdUy2LOurwUaonZx9ILrJY2ZvxTeKPU+gCuPXSbHPOG5bJkLfbWRLjwbBSmVM9Ur5A7TgLLSsTBnWg3TSln7f2SVnG8A6OK9zBIk0DazB3W/WYzg8DdvqMXkmIJgc8lXk4XZ0fg== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=arm.com;dmarc=pass action=none header.from=arm.com;dkim=pass header.d=arm.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=o3kfTW5q1aDeYMqfcwU4i1kCaZusB0X5p+q1XazJ9Lc=; b=npjp+mX9fxnkf8C9dwmAmnYJQjG7OFaJVvZOy8cReyis01JqSlSiP2vCp4YGPtP17eTfZ/MXDdh851lfCNCUE/vUnis6Pz7HAEcX+pC1xc4CvcLX0cJp5nUREolMWINxPdT9AeMML3E52Tdc7GIhyDHmr5P03/NXpLOG29q5lXM= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.227.22) by DB6PR0802MB2439.eurprd08.prod.outlook.com (10.172.251.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.17; Mon, 5 Aug 2019 12:41:55 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::5ce5:cf42:42dd:eda1]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::5ce5:cf42:42dd:eda1%6]) with mapi id 15.20.2136.018; Mon, 5 Aug 2019 12:41:55 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd , Alan Hayward Subject: [PATCH] AArch64: Allow additional sizes in prologue Date: Mon, 05 Aug 2019 12:42:00 -0000 Message-ID: <20190805124152.26127-1-alan.hayward@arm.com> Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:DB6PR0802MB2439; X-MS-Exchange-PUrlCount: 1 x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(136003)(346002)(376002)(39860400002)(396003)(366004)(189003)(199004)(54534003)(6916009)(2501003)(66066001)(6306002)(486006)(6512007)(476003)(2616005)(68736007)(2351001)(50226002)(7736002)(6486002)(4326008)(1076003)(99286004)(256004)(66946007)(66446008)(316002)(66556008)(64756008)(66476007)(305945005)(71200400001)(71190400001)(26005)(53936002)(54906003)(25786009)(44832011)(6116002)(3846002)(86362001)(5660300002)(478600001)(8936002)(14454004)(102836004)(386003)(186003)(52116002)(36756003)(6506007)(8676002)(5640700003)(6436002)(2906002)(81156014)(81166006)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2439;H:DB6PR0802MB2133.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: R0pklLnGfIUzFigmUwqYp0QGuRl6kDqH4PEkyxhf+AwbA/7udXcpIA/9MjWzKTpLJ+iRifg2poM0rh77B9Uxlm3IOev4N9Jzof7T1xIRIrdAiRs7Q36cfcx+O+u/gcrOnLnrz65fNL2Pa4+Eb7lUahzCB1m8nIwyKsBwjNdVTlHJf4rCKW+bfVr+DbQo5g57bXpgAs/O2H2545aK2Aoycv8gxYP8ts0GeIQlf4y6bqacUcw4fZkgnZrS0rH27uAFpCcymaAQro+hFdd4GMCT7lJDc33p2+E1QRddcUGs6tfAglA4wl0RoONnD7ERJdOMgk35wh3wOTosUM814Uu0JJRaX+OP4rZBm0b+7rMMvrY4LUAJJCL3y+76wk6k/SsZkbaQkYIr5hESUJZm/PvG85hN/9ejYNKZPUm5BJc5lf4= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; Return-Path: Alan.Hayward@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 95375eab-fa11-4bbe-48b8-08d719a24c42 X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00106.txt.bz2 Content-length: 8525 When saving registers to the stack at the start of a function, not all state needs to be saved. For example, only the first 64bits of float registers ne= ed saving. However, a program may choose to store extra state if it wishes, there is nothing preventing it doing so. The aarch64_analyze_prologue will error if it detects extra state being stored. Relex this restriction. Tested via aarch64-prologue test. gdb/ChangeLog: 2019-08-05 Alan Hayward * aarch64-tdep.c (aarch64_analyze_prologue): Allow any valid register sizes. gdb/testsuite/ChangeLog: 2019-08-05 Alan Hayward * gdb.arch/aarch64-prologue.c: New test. * gdb.arch/aarch64-prologue.exp: New file. --- gdb/aarch64-tdep.c | 28 ++----- gdb/testsuite/gdb.arch/aarch64-prologue.c | 83 +++++++++++++++++++++ gdb/testsuite/gdb.arch/aarch64-prologue.exp | 36 +++++++++ 3 files changed, 127 insertions(+), 20 deletions(-) create mode 100644 gdb/testsuite/gdb.arch/aarch64-prologue.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-prologue.exp diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index e23cc3f956..1926e54c3c 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -384,8 +384,7 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch, { unsigned rt =3D inst.operands[0].reg.regno; unsigned rn =3D inst.operands[1].addr.base_regno; - int is64 - =3D (aarch64_get_qualifier_esize (inst.operands[0].qualifier) =3D=3D = 8); + int size =3D aarch64_get_qualifier_esize (inst.operands[0].qualifier); =20 gdb_assert (aarch64_num_of_operands (inst.opcode) =3D=3D 2); gdb_assert (inst.operands[0].type =3D=3D AARCH64_OPND_Rt); @@ -394,7 +393,7 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch, =20 stack.store (pv_add_constant (regs[rn], inst.operands[1].addr.offset.imm), - is64 ? 8 : 4, regs[rt]); + size, regs[rt]); } else if ((inst.opcode->iclass =3D=3D ldstpair_off || (inst.opcode->iclass =3D=3D ldstpair_indexed @@ -406,6 +405,7 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch, unsigned rt2; unsigned rn =3D inst.operands[2].addr.base_regno; int32_t imm =3D inst.operands[2].addr.offset.imm; + int size =3D aarch64_get_qualifier_esize (inst.operands[0].qualifier); =20 gdb_assert (inst.operands[0].type =3D=3D AARCH64_OPND_Rt || inst.operands[0].type =3D=3D AARCH64_OPND_Ft); @@ -427,17 +427,12 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch, rt2 =3D inst.operands[1].reg.regno; if (inst.operands[0].type =3D=3D AARCH64_OPND_Ft) { - /* Only bottom 64-bit of each V register (D register) need - to be preserved. */ - gdb_assert (inst.operands[0].qualifier =3D=3D AARCH64_OPND_QLF_S_D); rt1 +=3D AARCH64_X_REGISTER_COUNT; rt2 +=3D AARCH64_X_REGISTER_COUNT; } =20 - stack.store (pv_add_constant (regs[rn], imm), 8, - regs[rt1]); - stack.store (pv_add_constant (regs[rn], imm + 8), 8, - regs[rt2]); + stack.store (pv_add_constant (regs[rn], imm), size, regs[rt1]); + stack.store (pv_add_constant (regs[rn], imm + size), size, regs[rt2]); =20 if (inst.operands[2].addr.writeback) regs[rn] =3D pv_add_constant (regs[rn], imm); @@ -454,21 +449,14 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch, unsigned int rt =3D inst.operands[0].reg.regno; int32_t imm =3D inst.operands[1].addr.offset.imm; unsigned int rn =3D inst.operands[1].addr.base_regno; - bool is64 - =3D (aarch64_get_qualifier_esize (inst.operands[0].qualifier) =3D=3D = 8); + int size =3D aarch64_get_qualifier_esize (inst.operands[0].qualifier); gdb_assert (inst.operands[0].type =3D=3D AARCH64_OPND_Rt || inst.operands[0].type =3D=3D AARCH64_OPND_Ft); =20 if (inst.operands[0].type =3D=3D AARCH64_OPND_Ft) - { - /* Only bottom 64-bit of each V register (D register) need - to be preserved. */ - gdb_assert (inst.operands[0].qualifier =3D=3D AARCH64_OPND_QLF_S_D); - rt +=3D AARCH64_X_REGISTER_COUNT; - } + rt +=3D AARCH64_X_REGISTER_COUNT; =20 - stack.store (pv_add_constant (regs[rn], imm), - is64 ? 8 : 4, regs[rt]); + stack.store (pv_add_constant (regs[rn], imm), size, regs[rt]); if (inst.operands[1].addr.writeback) regs[rn] =3D pv_add_constant (regs[rn], imm); } diff --git a/gdb/testsuite/gdb.arch/aarch64-prologue.c b/gdb/testsuite/gdb.= arch/aarch64-prologue.c new file mode 100644 index 0000000000..aa664f704f --- /dev/null +++ b/gdb/testsuite/gdb.arch/aarch64-prologue.c @@ -0,0 +1,83 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2019 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . = */ + +#include + +extern void excessiveprologue (); + +void +innerfunc () +{ + printf ("inner\n"); +} + +/* excessiveprologue saves to the stack in multiple ways. */ + +asm ("\t.section .gnu.sgstubs,\"ax\",%progbits\n" + "\t.global excessiveprologue\n" + "\t.type excessiveprologue, %function\n" + "excessiveprologue:\n" + "\tstp x29, x30, [sp, #-208]!\n" + "\tmov x29, sp\n" + "\tstp w0,w1,[sp,16]\n" + "\tstp x2,x3,[sp,24]\n" + "\tstr w4,[sp,40]\n" + "\tstr x5,[sp,48]\n" + "\tstur w6,[sp,52]\n" + "\tstur x7,[sp,56]\n" + "\tstp s0,s1,[sp,64]\n" + "\tstp d2,d3,[sp,72]\n" + "\tstp q4,q5,[sp,96]\n" + "\tstr b6,[sp,128]\n" + "\tstr h7,[sp,132]\n" + "\tstr s8,[sp,136]\n" + "\tstr d9,[sp,140]\n" + "\tstr q10,[sp,148]\n" + "\tstur b11,[sp,164]\n" + "\tstur h12,[sp,160]\n" + "\tstur s13,[sp,172]\n" + "\tstur d14,[sp,176]\n" + "\tstur q15,[sp,184]\n" + "\tbl innerfunc\n" + "\tldp w0,w1,[sp,16]\n" + "\tldp x2,x3,[sp,24]\n" + "\tldr w4,[sp,40]\n" + "\tldr x5,[sp,48]\n" + "\tldur w6,[sp,52]\n" + "\tldur x7,[sp,56]\n" + "\tldp s0,s1,[sp,64]\n" + "\tldp d2,d3,[sp,72]\n" + "\tldp q4,q5,[sp,96]\n" + "\tldr b6,[sp,128]\n" + "\tldr h7,[sp,132]\n" + "\tldr s8,[sp,136]\n" + "\tldr d9,[sp,140]\n" + "\tldr q10,[sp,148]\n" + "\tldur b11,[sp,164]\n" + "\tldur h12,[sp,160]\n" + "\tldur s13,[sp,172]\n" + "\tldur d14,[sp,176]\n" + "\tldur q15,[sp,184]\n" + "\tldp x29, x30, [sp], #208\n" + "ret\n"); + +int +main (void) +{ + excessiveprologue (); + return 0; +} diff --git a/gdb/testsuite/gdb.arch/aarch64-prologue.exp b/gdb/testsuite/gd= b.arch/aarch64-prologue.exp new file mode 100644 index 0000000000..e31261ad25 --- /dev/null +++ b/gdb/testsuite/gdb.arch/aarch64-prologue.exp @@ -0,0 +1,36 @@ +# Copyright 2019 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# This file is part of the gdb testsuite. + +if {![is_aarch64_target]} { + verbose "Skipping ${gdb_test_file_name}." + return 1 +} + +standard_testfile +if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}= ]} { + return -1 +} + +if ![runto_main] { + untested "could not run to main" + return -1 +} + +# Ensure gdb can break at excessiveprologue then continue. +gdb_breakpoint "excessiveprologue" +gdb_continue_to_breakpoint "excessiveprologue" +gdb_continue_to_end "excessiveprologue" "continue" 1 --=20 2.20.1 (Apple Git-117)