From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81034 invoked by alias); 21 Jan 2020 11:21:31 -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 81012 invoked by uid 89); 21 Jan 2020 11:21:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=AWL,BAYES_00,FORGED_SPF_HELO,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 spammy=luis X-HELO: EUR03-DB5-obe.outbound.protection.outlook.com Received: from mail-eopbgr40072.outbound.protection.outlook.com (HELO EUR03-DB5-obe.outbound.protection.outlook.com) (40.107.4.72) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Jan 2020 11:21:20 +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=xDijoILR3DMqiQCGQlF/UkvDTXCdM5XdA2Y3ZOZqcxU=; b=10zgLJRqPq9hb7jkF7vNwWoIkj+4LMADN+C4Ps+f5NgPQVkVBpNu5E8bFijzlVkscGuMiLO3n8uheOfswlp4FsQ7NQe0CLmf9qz10IfsUvSLLz7BKzsOQ9yIpBBwBRhXrrIpgcv8q2GxJzco0wswuzO+BLjz7K7RK5vqTHBidT0= Received: from VI1PR08CA0164.eurprd08.prod.outlook.com (2603:10a6:800:d1::18) by AM7PR08MB5416.eurprd08.prod.outlook.com (2603:10a6:20b:10e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Tue, 21 Jan 2020 11:21:16 +0000 Received: from AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::206) by VI1PR08CA0164.outlook.office365.com (2603:10a6:800:d1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19 via Frontend Transport; Tue, 21 Jan 2020 11:21:16 +0000 Authentication-Results: spf=pass (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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT045.mail.protection.outlook.com (10.152.17.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.23 via Frontend Transport; Tue, 21 Jan 2020 11:21:15 +0000 Received: ("Tessian outbound ba41a0333779:v40"); Tue, 21 Jan 2020 11:21:15 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8111f17b9d590495 X-CR-MTA-TID: 64aa7808 Received: from 798b029d5815.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B3624B28-DFB9-4594-89F6-E249389EA798.1; Tue, 21 Jan 2020 11:21:10 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 798b029d5815.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 21 Jan 2020 11:21:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q2E7Pky0bXeYER7TNIVrH/dW3olv/MgrQbviCvqbAiKuI2beYHU6OuOe88cd7sRrY6uN/+kRgMWDNd7k+BxuiHLBSJ69V2CKj44sLOEAe36UU0wxlZ7rTdrbPBozpQdlvGLtSFdzVjRfZ3sJMyTKz9HGuFNciPrkF5GeKHo0OSYAbJkaftxcarx9yCJ5xslbET2UyaALK0Nucm2s4YYugq+9tXP/zKhxXnnESqAjtniHW1026ImyrS5hq9AqOHbkgTtWBz11mWEgMyY8VABBawkr+ighcEqdKQD+Q+lPB0h3ZmSS31xdMOKW6b/hUY2B8SRCMXhYYbuX5dWS5jmocg== 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=xDijoILR3DMqiQCGQlF/UkvDTXCdM5XdA2Y3ZOZqcxU=; b=YG/yAT0qR8XOHP7f04fNuqd/rWrAQzuPSn5l9nhKeav85z+OgauAI2C/5BnEv2maIuzl90yzcyoIvIw8qwLOczQ6S08P6+lc1/79n933jrVB6KJdOlmNNJNG/+cDQTKTQ2nI5tQDVEf0rpMWqNO84VO78q60Is7B/F6zBZor8DD39um0ouXJ29bHtSHrQVJ2/1q5FUFyMxwAosxFnAUQRmRVte1yOeMgoa65YORcV9/XZqXLfwkafn364CqPYFKozJC9j1P9MdkotiJ1mFfebm/cbau7b48lmiiPZVJ7reKO5vyKjdFAV4LQ36sVFgJd6b39ehJyLolrC6EFii/DMw== 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=xDijoILR3DMqiQCGQlF/UkvDTXCdM5XdA2Y3ZOZqcxU=; b=10zgLJRqPq9hb7jkF7vNwWoIkj+4LMADN+C4Ps+f5NgPQVkVBpNu5E8bFijzlVkscGuMiLO3n8uheOfswlp4FsQ7NQe0CLmf9qz10IfsUvSLLz7BKzsOQ9yIpBBwBRhXrrIpgcv8q2GxJzco0wswuzO+BLjz7K7RK5vqTHBidT0= Received: from AM0PR08MB5330.eurprd08.prod.outlook.com (52.132.212.151) by AM0PR08MB3570.eurprd08.prod.outlook.com (20.177.110.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20; Tue, 21 Jan 2020 11:21:08 +0000 Received: from AM0PR08MB5330.eurprd08.prod.outlook.com ([fe80::89cf:a33e:c415:d30]) by AM0PR08MB5330.eurprd08.prod.outlook.com ([fe80::89cf:a33e:c415:d30%6]) with mapi id 15.20.2644.027; Tue, 21 Jan 2020 11:21:08 +0000 From: Alan Hayward To: Luis Machado CC: "gdb-patches\\@sourceware.org" , nd Subject: Re: [PATCH,v2][AArch64] Add more debugging output to aarch64_displaced_step_fixup Date: Tue, 21 Jan 2020 11:24:00 -0000 Message-ID: References: <20200113174239.7819-1-luis.machado@linaro.org> In-Reply-To: <20200113174239.7819-1-luis.machado@linaro.org> Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:1923;OLM:1923; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(199004)(189003)(66556008)(478600001)(66476007)(86362001)(55236004)(66446008)(64756008)(316002)(54906003)(2616005)(36756003)(186003)(26005)(6506007)(53546011)(6916009)(76116006)(33656002)(91956017)(66946007)(6512007)(4326008)(81156014)(8676002)(81166006)(6486002)(8936002)(71200400001)(5660300002)(2906002)(142933001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR08MB3570;H:AM0PR08MB5330.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-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ja/O+DVlRfmfdoiUFhrEUs0K6Skmb0GhiepeaUuxSXaYZNgEA/O4hAznVcUdZ0kLIYyAfb55J0zYdzGzTHLWWNSWC9v+f+Fk/9fUKGIjCnDzIjJdqWZU5XuxqdCTXgyIafkVWhMLbOJD17DoEmxV/K28jrWu94q59/b8RD/qwFWizLB11oQmVivuRU/wopNZcjDL8qFAfJ+53B/Ie1j2iLcDJx1SzctRCD/cYPaOvhVVEoH8erObYsaPrFd0JnEX5Y3xSY/ycl4lxHp3G8MdwkSNM8A3YJwBIk/PoJLebwIX7JqaF1aQ9fbJ+erYwWM4kh1+/lJnjwogpl1lOb6H83FN9lunk5Epqm+6R55GY+4q5bzP2dzkvRhYDWsgCdloEZDLFCjhUq5hm4sBDawKbCHavVBoVkgsUTPaGmyxAM3/Jee6gTi0jNF7Tx2PYhRvClQO3UZvj2GEmnkZ0ujmcvN4T2naGvI25Bi6ZUOtrTzhF453gWEk28cO9l5f+Y71 x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-ID: <15AEFAAF1CAF12478C9418463258316C@eurprd08.prod.outlook.com> 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: AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 2ec99145-5a99-4e6c-5d3c-08d79e640376 X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00627.txt.bz2 Ok to push. Alan. > On 13 Jan 2020, at 17:42, Luis Machado wrote: >=20 > New in v2: >=20 > - Fixed misc comments from review. >=20 > -- >=20 > While debugging the step-over-syscall problem, i wanted to see a bit more > debugging output to try to determine the root cause. >=20 > This patch does this. >=20 > gdb/ChangeLog: >=20 > 2020-01-13 Luis Machado >=20 > * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging > output. > --- > gdb/aarch64-tdep.c | 27 +++++++++++++++++++++++++-- > 1 file changed, 25 insertions(+), 2 deletions(-) >=20 > diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c > index 6a9d34dc67..29b712c155 100644 > --- a/gdb/aarch64-tdep.c > +++ b/gdb/aarch64-tdep.c > @@ -3037,8 +3037,16 @@ aarch64_displaced_step_fixup (struct gdbarch *gdba= rch, >=20 > regcache_cooked_read_unsigned (regs, AARCH64_PC_REGNUM, &pc); >=20 > + if (debug_displaced) > + debug_printf ("Displaced: PC after stepping: %s (was %s).\n", > + paddress (gdbarch, pc), paddress (gdbarch, to)); > + > if (dsc->cond) > { > + if (debug_displaced) > + debug_printf ("Displaced: [Conditional] pc_adjust before: %d\n", > + dsc->pc_adjust); > + > if (pc - to =3D=3D 8) > { > /* Condition is true. */ > @@ -3050,8 +3058,18 @@ aarch64_displaced_step_fixup (struct gdbarch *gdba= rch, > } > else > gdb_assert_not_reached ("Unexpected PC value after displaced stepping"); > + > + if (debug_displaced) > + debug_printf ("Displaced: [Conditional] pc_adjust after: %d\n", > + dsc->pc_adjust); > } >=20 > + if (debug_displaced) > + debug_printf ("Displaced: %s PC by %d\n", > + dsc->pc_adjust? "adjusting" : "not adjusting", > + dsc->pc_adjust); > + > + > if (dsc->pc_adjust !=3D 0) > { > /* Make sure the previous instruction was executed (that is, the PC > @@ -3059,11 +3077,16 @@ aarch64_displaced_step_fixup (struct gdbarch *gdb= arch, > offset. Otherwise we may skip an instruction before its execution > took place. */ > if ((pc - to) =3D=3D 0) > - dsc->pc_adjust =3D 0; > + { > + if (debug_displaced) > + debug_printf ("Displaced: PC did not move. Discarding PC " > + "adjustment.\n"); > + dsc->pc_adjust =3D 0; > + } >=20 > if (debug_displaced) > { > - debug_printf ("displaced: fixup: set PC to %s:%d\n", > + debug_printf ("Displaced: fixup: set PC to %s:%d\n", > paddress (gdbarch, from), dsc->pc_adjust); > } > regcache_cooked_write_unsigned (regs, AARCH64_PC_REGNUM, > --=20 > 2.17.1 >=20