From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118199 invoked by alias); 31 May 2018 14:43:42 -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 118142 invoked by uid 89); 31 May 2018 14:43:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 31 May 2018 14:43:39 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w4VEhX91013966 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 31 May 2018 10:43:38 -0400 Received: by simark.ca (Postfix, from userid 112) id D155B1E52D; Thu, 31 May 2018 10:36:43 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 0E6501E4F7; Thu, 31 May 2018 10:36:40 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 31 May 2018 14:55:00 -0000 From: Simon Marchi To: Uros Bizjak Cc: Simon Marchi , gdb-patches@sourceware.org, Tobias Klausmann , rth@twiddle.net Subject: Re: [PATCH]: Fix PR19061, gdb hangs/spins-on-cpu when debugging any program on Alpha In-Reply-To: References: <56293ba8-f95b-5da1-af14-7500a0f8f892@ericsson.com> Message-ID: <4a93db59737d2b7ebbea5982180f16d2@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 31 May 2018 14:43:33 +0000 X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00852.txt.bz2 On 2018-05-31 05:23, Uros Bizjak wrote: > On Wed, May 30, 2018 at 4:53 PM, Simon Marchi > wrote: >> Does Alpha even have hardware breakpoints? If not, I would suggest >> defining GDB_ARCH_IS_TRAP_HWBKPT to 0 for __alpha__. It would get >> rid of the error, and be more exact (no si_code can mean "hardware >> breakpoint" on alpha). > > I didn't find any mentions of hardware breakpoint support in Alpha > Architecture Handbook v.4. > > Please note that save_stop_reason from linux-nat.c has some code to > detect ambigous si_code, where si_code is both TRAP_BRKPT and > TRAP_HWBKPT, and returns TARGET_STOPPED_BY_SW_BREAKPOINT in this case. > So, if we don't define anything for __alpha__ in nat/linux-ptrace.h, > we get the same result. TRAP_BKPT and TRAP_HWBKPT are different, so this will never happen with the default definitions of GDB_ARCH_IS_TRAP_BRKPT/GDB_ARCH_IS_TRAP_HWBKPT. Since the kernel for alpha never sets si_code to TRAP_HWBKPT, it means we'll never get in to the HW breakpoint branch, which is fine. In short, the patch LGTM. > I have tested the attached patch, and resulting gdb works OK for me. Thanks! Simon