From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3053 invoked by alias); 1 Jun 2010 09:06:39 -0000 Received: (qmail 3037 invoked by uid 22791); 1 Jun 2010 09:06:38 -0000 X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50,MSGID_MULTIPLE_AT,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cam-admin0.cambridge.arm.com (HELO cam-admin0.cambridge.arm.com) (217.140.96.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Jun 2010 09:06:31 +0000 Received: from cam-owa2.Emea.Arm.com (cam-owa2.emea.arm.com [10.1.105.18]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id o5196JeI017804; Tue, 1 Jun 2010 10:06:19 +0100 (BST) Received: from e102139 ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 1 Jun 2010 10:06:19 +0100 From: "Will Deacon" To: "'Karthikeyan S'" , "Matthew Gretton-Dann" , "xingxing pan" Cc: References: <1275038883.23133.51.camel@e102319-lin.cambridge.arm.com> <113ACA888B71994BB56E5CF3704953486BAA6A18D8@BGMAIL02.nvidia.com> In-Reply-To: <113ACA888B71994BB56E5CF3704953486BAA6A18D8@BGMAIL02.nvidia.com> Subject: RE: [HELP]Can GDB for ARM set hard breakpoint when native debugging? Date: Tue, 01 Jun 2010 09:06:00 -0000 Message-ID: <000701cb0169$b124bd80$136e3880$@deacon@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00000.txt.bz2 Hi Karthik, > I started out at implementing hardware watchpoint support for armv7 in gdb. For a start, I added the > necessary functions in gdb for armv7 architecture. Also made the kernel changes for "context id based > watchpoint". I've had a go at implementing a backend for hardware watchpoints and breakpoints in the Kernel: http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/011170.html I'm hoping to submit a newer version of this patchset against 2.6.35. I'll add you on CC when I post it to the list. The main changes will be: - Only allowing ptrace interaction with the framework - Changing the ptrace API to mirror the ARMv7 architected control registers - Updated to work with the latest HW-breakpoint framework in the Kernel It's worth noting that using the context-id based watchpoint will almost certainly break in the case of ASID rollover for a process. It also won't allow you to install watchpoints on a per-thread basis afaict. The HW-breakpoint framework inserts/removes breakpoints on context switch so the need for hardware assisted context id matching is removed. Thanks, Will