From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19137 invoked by alias); 16 Sep 2013 12:44:02 -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 19127 invoked by uid 89); 16 Sep 2013 12:44:01 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Sep 2013 12:44:01 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8GChr3U025627 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 16 Sep 2013 08:43:53 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8GChoao022403; Mon, 16 Sep 2013 08:43:51 -0400 Message-ID: <5236FD06.9070807@redhat.com> Date: Mon, 16 Sep 2013 12:44:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Andrew Pinski CC: Will Newton , Andreas Schwab , "gdb-patches@sourceware.org" Subject: Re: [PATCH/AARCH64] Fix hardware break points References: <87k3kbbsbz.fsf@igel.home> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-09/txt/msg00439.txt.bz2 On 09/12/2013 08:15 AM, Andrew Pinski wrote: > On Tue, Sep 10, 2013 at 7:37 AM, Will Newton wrote: >> On 27 July 2013 23:42, Andrew Pinski wrote: >> >> Hi Andrew, >> >>> On Sat, Jul 27, 2013 at 2:34 PM, Andreas Schwab wrote: >>>> Andrew Pinski writes: >>>> >>>>> OK? Built and tested on aarch64-linux-gnu with no regressions. >>>> >>>> Did you? >>>> >>>>> + memset (®s, 0, size(regs)); >>> >>> This is what I get for copying and pasting from one source file to another. >>> >>> Here is the fixed one which was definitely tested. >> >> What's the status of this patch? It seems like it fixes real problems >> people are seeing in the field. > After not much thought, I decided this was an obvious patch as regs is > used uninitialized otherwise when passed to ptrace. Leaves me wondering what field of regs other than regs.dbg_regs is the kernel actually looking at then for NT_ARM_HW_WATCH/NT_ARM_HW_BREAK, given regs.dbg_regs _is_ initialized: for (i = 0; i < count; i++) { regs.dbg_regs[i].addr = addr[i]; regs.dbg_regs[i].ctrl = ctrl[i]; } if (ptrace (PTRACE_SETREGSET, tid, watchpoint ? NT_ARM_HW_WATCH : NT_ARM_HW_BREAK, (void *) &iov)) Makes me wonder whether the issue is that "count" isn't right for the running kernel. Was a patch for gdbserver ever posted/committed? AFAICS, gdbserver's aarch64_linux_set_debug_regs is an exact copy of gdb's. -- Pedro Alves