From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70079.outbound.protection.outlook.com [40.107.7.79]) by sourceware.org (Postfix) with ESMTPS id 115083888C54 for ; Wed, 30 Mar 2022 15:23:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 115083888C54 Received: from DB8PR06CA0054.eurprd06.prod.outlook.com (2603:10a6:10:120::28) by VE1PR08MB4752.eurprd08.prod.outlook.com (2603:10a6:802:a4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.19; Wed, 30 Mar 2022 15:23:29 +0000 Received: from DB5EUR03FT028.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:120:cafe::7c) by DB8PR06CA0054.outlook.office365.com (2603:10a6:10:120::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.23 via Frontend Transport; Wed, 30 Mar 2022 15:23:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass 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 DB5EUR03FT028.mail.protection.outlook.com (10.152.20.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.19 via Frontend Transport; Wed, 30 Mar 2022 15:23:29 +0000 Received: ("Tessian outbound 78191104f1b7:v118"); Wed, 30 Mar 2022 15:23:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b09f5aa7cab3188f X-CR-MTA-TID: 64aa7808 Received: from 13681b3d49ba.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4DC97080-3115-4863-B235-3CE001828D66.1; Wed, 30 Mar 2022 15:23:22 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 13681b3d49ba.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 30 Mar 2022 15:23:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Imj2B1eHOgcQwGdgyiUnZYwf09+JvH+uZ3neBZRIfKh6/5yJ3BOYmivvMIt2tW62mP6MC03D1k0tqq46WMPKmFN5T7suW35IjRpkDHl4zBCRR6dzVRPpnlkARzP2pOw2fJAZAewOB3agg0/5yxSqFRe3o6796vXodhd7gxv2CT6kjPrDCV1QYit2PDEs9OWPqYIk1y8qjKXkDxX1m0VksEofep9zMuRyEK/5ZEAZ/7zA1HfuMgb6UFE9Dt0nOtp99X0NrD5smdT/oS+k4iffaftDTd9ngTIxgM2g3OxEcYpqOtYN6L6YOfsFKChs6xOBP3iWZINOWPkLmwZ/RGJFOA== 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=OvEuIpvbGsnpnbSKzvO/zzNCT0CY3s6dyMS0+4eo068=; b=CJn8uVwseCZwYh99CDtSKDoiFC3peqEk+/6OjtlcymSBHvk3xuPkKX3LTWJm8zjRAa4uBMtyMJI/gNJYgKqqZipwtDGRRscilkFiGoxzWl5Mgo5YWKK2XRkQpeQCInd/GvWIOBxrMwgOUm4IxTR0F2/5X/gPLVtexvrQ0Uh73nMwZbfY08RheVwAhcUTVK6Y4UPZj4uK1x9UH0+0/DQhhI7p7i2ASIT/xG/1vJI7u6L4zSx3y3OnjAGeglt+0r2roI+fq0ocJSnnj7XoT8BYR9AV8AJOeH4aYT31JKSKATFgyMvl5TC+DEYZuwYAXVRNYKZXSirhK0OSMBVDR4id5Q== 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 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by AM9PR08MB7120.eurprd08.prod.outlook.com (2603:10a6:20b:3dc::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.18; Wed, 30 Mar 2022 15:23:20 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::905f:29ee:d858:516e]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::905f:29ee:d858:516e%7]) with mapi id 15.20.5102.023; Wed, 30 Mar 2022 15:23:20 +0000 Message-ID: Date: Wed, 30 Mar 2022 16:23:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v2 00/12] FreeBSD/aarch64 hardware watchpoint support Content-Language: en-US To: John Baldwin , gdb-patches@sourceware.org References: <20220316201923.89694-1-jhb@FreeBSD.org> From: Luis Machado In-Reply-To: <20220316201923.89694-1-jhb@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LNXP265CA0067.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5d::31) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 427cd166-b63b-4f66-c315-08da12613e64 X-MS-TrafficTypeDiagnostic: AM9PR08MB7120:EE_|DB5EUR03FT028:EE_|VE1PR08MB4752:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 2Q0lt740vWLL9VcirOTVgq5EsD1tj3IndpICgnStdxXbuQkPwvEFXmpxksRvbib23tS8ozMJGh4glY/NExHoZJzIMejYVr8xm9w4iefUWVJEliLf4N/zsvdI7JOKsbaxdfdLg6Y0yM/FJWujB7kFOEOSKgDQLuSvs5JD/iLAvHrG9v8RYe25PbHL+TPnHdIgfVrOlkMVyz9+6O3d/wqMSNckoNFm9sADAhPPT2tMsw85JhrBsKc1XH7JRW9S6vKHhA5josB4j7nC1gRyo3KdBDQ1F5UOu0RjOZXfbVerZhnQzh8Pc0kLlxJgYcd0QgBQJXrsnvPkrhD3kIxrt/jQ07h4ADKK9Hl4yg1yeoXtpf2euurz4qBW3PuGVex6WUyYE9fYw9EAW5yBJv/IwcajAp6yay+HU3apD7kD2xeRPH70vUfkduaEjC52eHRhO0gxd3Pj1KVW0T3jFQzIBa61R14R+7RuKSru4TQvEhtuFrBp68SuOsNX5fn7tBasO0W2b7E+tbuM0BIm9C5kYXlHsJloMOtyrOWDcpg3PU8QkUy+F+2Ul9BhN5/ooq4plX4N0qnRYi/u1D+TF8Da8IwVC5MqyG27lLu1ZTbU8VAffkmYhVyVxyUcb0ZMMXD08z/RxaQ5AGPe07Wt7z5s8GguZVUhI5GXQck72TEUYXE+AqEM8MdDPZVHwe+NUEjORfCFQrlnkXBooM4LFk2TFLiMYb5nBbNmpwDFgk7RqqahWZQ= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB3919.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(31696002)(26005)(186003)(38100700002)(6666004)(53546011)(8936002)(83380400001)(6506007)(86362001)(31686004)(36756003)(5660300002)(508600001)(316002)(66556008)(66476007)(6512007)(2616005)(66946007)(44832011)(2906002)(6486002)(8676002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB7120 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a3717c4c-8094-483b-1c81-08da12613899 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iZdOCvMs013B4GXaJFIVERJ7Z+WcK9PN+buTQrcNTdBhF8/wm0JqBg8nXcwk9vg/IgvgZ9bhzF7Zl/+JKauiUzyI/wiIFWH34jME6dG0DW8f3oAjqEQ75u+NPz0uhS5+G3/0M/F2164G/zAb7Lyti0q1TRGm0rjqw4Foq0OH6JhBkJF3krC2Y8c36A4nX34bPfdZ78nZxjcoL6Gm21XDlwSCRXpas9+NOiAh3YPZB8feYPufuJBF7X1XM8KP12mt2E0yUYg3mXy3ezBzYI9/GIh5wiU6zCYCxUroYVjw7sUWl294nil8AqdksjutZj3x/T0mDxqPyhMAZnkSXd+5xmbkdb3V9dWrU9vUcMlzoRNU9g5yJeVtVXFnJuByR1+4yWhWY4g2Pr+eQ17ycOpZGXNeOBoMuSQHUojwD3+DreJkTHu58XZHiu06nLdyCdnQTB9yVZ6+3dBpdfOasth+WwaxSMGsmS09xhH6TemY5x/CxqJoQ+SOn99kJaZV/hOBC00lKUQUuILN/1Up0LAMq9ay5/wTJy9chOju1WEtF/rgLsS3wpR63aw1lCiK+Ookc740xKXSyQWZNn4nmjMXuS3TdgQAfghX11kBQhd5XUA5cxXy85otRK77zgnC+sZGGJzf6Tl8W9IS1zp49bT85vMZKnEccls7du6xFSCOM46IH9KKMFk41i8w5Ylu65LeXQ5u4Emr8uhj+KPHZYLjJA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(31696002)(316002)(86362001)(6666004)(36756003)(70586007)(70206006)(2616005)(8676002)(82310400004)(81166007)(6512007)(53546011)(6506007)(356005)(508600001)(83380400001)(36860700001)(31686004)(47076005)(40460700003)(5660300002)(6486002)(44832011)(336012)(186003)(8936002)(26005)(2906002)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2022 15:23:29.4265 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 427cd166-b63b-4f66-c315-08da12613e64 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4752 X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 30 Mar 2022 15:23:36 -0000 Hi John, This breaks aarch64's build. fprintf_unfiltered doesn't exist anymore, and this patch is still using it. On 3/16/22 20:19, John Baldwin wrote: > Changes since V1: > > - The unordered_map<>'s in x86-nat.c and aarch64-nat.c both now store > objects directly rather than pointers to objects. > > - Trimmed "Contributed by" notices from new files. > > - I have compiled and (very lightly) tested this on Linux Aarch64. > By light testing I mean that I ran a test program with a harware > breakpoint set on main and it stopped correctly. I haven't run a > full test suite as my Aarch64 test box is a lowly Raspberry Pi > for which such a run would take a fairly long time. > > I still have some open questions about Patch 6 from the first > version: > > Patch 6 has an open question about how best to handle having a > platform-specific hook for when debug registers have been changed. > Right now we require the platform to supply the function that > nat/aarch64-hw-point.c calls. I did not choose to create an > equivalent to x86_dr_low, but perhaps that sort of structure, or at > least a function pointer should be used instead? > > There is also some messiness around the Linux-specific > kernel_supports_any_contiguous_range workaround in patch 6. > > OTOH, some of the FreeBSD/x86 cleanups in the first half of the series > (such as adding x86-fbsd-nat.*) might be nice to reuse in my XSAVE > series, so if that half of the series is ok (first 5 patches), it > might be nice to push that in sooner. > > John Baldwin (12): > Remove USE_SIGTRAP_SIGINFO condition for FreeBSD/x86 debug regs > support. > x86-nat: Use an unordered_map to store per-pid debug reg state. > x86-nat: Add x86_lookup_debug_reg_state. > Add an x86_fbsd_nat_target mixin class for FreeBSD x86 native targets. > fbsd-nat: Add a low_new_fork virtual method. > x86-fbsd-nat: Copy debug register state on fork. > nat: Split out platform-independent aarch64 debug register support. > aarch64: Add an aarch64_nat_target mixin class. > fbsd-nat: Add helper routine to fetch siginfo_t for a ptid. > fbsd-nat: Add a low_delete_thread virtual method. > fbsd-nat: Add a low_prepare_to_resume virtual method. > Add support for hardware breakpoints/watchpoints on FreeBSD/Aarch64. > > gdb/NEWS | 2 + > gdb/aarch64-fbsd-nat.c | 260 ++++++++++++- > gdb/aarch64-linux-nat.c | 352 +---------------- > gdb/aarch64-nat.c | 302 +++++++++++++++ > gdb/aarch64-nat.h | 109 ++++++ > gdb/amd64-fbsd-nat.c | 20 +- > gdb/configure.nat | 12 +- > gdb/fbsd-nat.c | 28 +- > gdb/fbsd-nat.h | 18 + > gdb/i386-fbsd-nat.c | 20 +- > gdb/nat/aarch64-hw-point.c | 624 +++++++++++++++++++++++++++++++ > gdb/nat/aarch64-hw-point.h | 126 +++++++ > gdb/nat/aarch64-linux-hw-point.c | 605 +----------------------------- > gdb/nat/aarch64-linux-hw-point.h | 105 +----- > gdb/nat/aarch64-linux.c | 4 +- > gdb/x86-fbsd-nat.c | 45 +++ > gdb/x86-fbsd-nat.h | 36 ++ > gdb/x86-nat.c | 92 +---- > gdb/x86-nat.h | 5 + > gdbserver/configure.srv | 1 + > gdbserver/linux-aarch64-low.cc | 13 +- > 21 files changed, 1612 insertions(+), 1167 deletions(-) > create mode 100644 gdb/aarch64-nat.c > create mode 100644 gdb/aarch64-nat.h > create mode 100644 gdb/nat/aarch64-hw-point.c > create mode 100644 gdb/nat/aarch64-hw-point.h > create mode 100644 gdb/x86-fbsd-nat.c > create mode 100644 gdb/x86-fbsd-nat.h >