From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28093 invoked by alias); 31 Jul 2014 12:08:13 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 27912 invoked by uid 48); 31 Jul 2014 12:08:11 -0000 From: "will.newton at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/16571] gdb can not work (linux aach64) Date: Thu, 31 Jul 2014 12:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.6 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: will.newton at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q3/txt/msg00199.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16571 Will Newton changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |will.newton at gmail dot com Resolution|--- |FIXED --- Comment #1 from Will Newton --- This issue is fixed in gdb 7.8, but you also must make sure you have a recent kernel with this commit: commit cdc27c27843248ae7eb0df5fc261dd004eaa5670 Author: Will Deacon Date: Tue Dec 17 17:09:08 2013 +0000 arm64: ptrace: avoid using HW_BREAKPOINT_EMPTY for disabled events Commit 8f34a1da35ae ("arm64: ptrace: use HW_BREAKPOINT_EMPTY type for disabled breakpoints") fixed an issue with GDB trying to zero breakpoint control registers. The problem there is that the arch hw_breakpoint code will attempt to create a (disabled), execute breakpoint of length 0. This will fail validation and report unexpected failure to GDB. To avoid this, we treated disabled breakpoints as HW_BREAKPOINT_EMPTY, but that seems to have broken with recent kernels, causing watchpoints to be treated as TYPE_INST in the core code and returning ENOSPC for any further breakpoints. This patch fixes the problem by prioritising the `enable' field of the breakpoint: if it is cleared, we simply update the perf_event_attr to indicate that the thing is disabled and don't bother changing either the type or the length. This reinforces the behaviour that the breakpoint control register is essentially read-only apart from the enable bit when disabling a breakpoint. Cc: Reported-by: Aaron Liu Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas -- You are receiving this mail because: You are on the CC list for the bug.