From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50433 invoked by alias); 16 Jul 2017 01:19:11 -0000 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 Received: (qmail 50305 invoked by uid 89); 16 Jul 2017 01:19:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=research X-HELO: mail-qt0-f194.google.com Received: from mail-qt0-f194.google.com (HELO mail-qt0-f194.google.com) (209.85.216.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 16 Jul 2017 01:19:07 +0000 Received: by mail-qt0-f194.google.com with SMTP id m54so14531869qtb.1 for ; Sat, 15 Jul 2017 18:19:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xtqCMEqoKy0c1LuL4x0EzOy3X61f08vZzLb3AXs+z34=; b=siTh6TN2Ua3ZSjNIgt7dsSaKOB+6kDcsK9kCAIalvBoBVFsfSHAg7i+g0fyXUuo8ZE h7X7RC1h1DYimQ/x+7lUV3Q21pLY7DNXrQ2hNiKkHdvL2tNUAaeswRW+zjKzhR1Dbccp yJCaqgLDoFRxV3SxM/EdF00BrTeQE9nxTlE4IPg5iadqSKjR3Ib3Py7em9AAGHgAvZ8w U5cxdEskxGz8qIciQzu4364kMUo+S9i7lU95Ws/2Jrv28835e276gDiXyj0UdgbcUa5a 7C6W3LsenrTa9ZsuFcY0V2CiF99Ckjf/ZV5N5C4tKBWkdF4M0v1gg0RdTt8mJ+e9V2fc wDTA== X-Gm-Message-State: AIVw110sNIMDdSzVJQ9zPH9L8J+cGMtbAHaS+iX0djt2tJ9NRedR7TgK OI+CRyAxr/UIBhnt53+SSpflQxiPLViC X-Received: by 10.237.54.225 with SMTP id f88mr19255166qtb.240.1500167945992; Sat, 15 Jul 2017 18:19:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.44.5 with HTTP; Sat, 15 Jul 2017 18:19:05 -0700 (PDT) From: Christian Gagneraud Date: Sun, 16 Jul 2017 01:19:00 -0000 Message-ID: Subject: HW watchpoint on Linux/ARM To: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00028.txt.bz2 Hi there, Does anyone know if it is possible to use HW watchpoint on ARM platform? I have tried this feature on a Freescale i.mx6 CPU and a TI Sitara (both ARM cortex), with GDB 7.12 and was unsuccessful so far. I did some research, and it seems to me that this feature is supported by both GDB for ARM and Linux for ARM Support in GDB 7.12.1: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/gdbserver/linux-arm-low.c;h=b2b22581634489bc68130620428cda25f6ae43a0;hb=59b102452f0bdab7a9b19d9fdbb8ce5253f0ce9f Support in Linux 4.9: https://github.com/torvalds/linux/blob/v4.9/arch/arm/kernel/hw_breakpoint.c When I tried with my i.mx6 system, I thought that my system might be a bit old, so I decided to try with my BeagleBone system, which run a much more recent software stack (Linux 4.9.37, GDB 7.12.1). At this point i don't know which of GDB or Linux (or me) is to blame. Has anyone had any success with hardware watchpoint on ARM (Cortex) platform? Any sort of feedback appreciated. Update: On BeagleBone, the blame goes to Linux, it doesn't support ARM_DEBUG_ARCH_V7_MM (memory-mapped interface), the kernel says "hw-breakpoint: debug architecture 0x4 unsupported." But on i.mx6, it does. From memory, the kernel told me that I have access to 5 HW breakpoints and 1 HW watchpoint (I don't have the board at hand, but will post details on Monday). Thanks, Chris