From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19613 invoked by alias); 14 Jul 2014 23:28:53 -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 19601 invoked by uid 89); 14 Jul 2014 23:28:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e24smtp03.br.ibm.com Received: from e24smtp03.br.ibm.com (HELO e24smtp03.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 14 Jul 2014 23:28:50 +0000 Received: from /spool/local by e24smtp03.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 14 Jul 2014 20:28:45 -0300 Received: from d24dlp01.br.ibm.com (9.18.248.204) by e24smtp03.br.ibm.com (10.172.0.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 14 Jul 2014 20:28:42 -0300 Received: from d24relay02.br.ibm.com (d24relay02.br.ibm.com [9.13.184.26]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id 8B6063520054 for ; Mon, 14 Jul 2014 19:28:35 -0400 (EDT) Received: from d24av05.br.ibm.com (d24av05.br.ibm.com [9.18.232.44]) by d24relay02.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s6ENRrqF8782176 for ; Mon, 14 Jul 2014 20:27:53 -0300 Received: from d24av05.br.ibm.com (localhost [127.0.0.1]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s6ENSeLu007220 for ; Mon, 14 Jul 2014 19:28:40 -0400 Received: from grandaddy.ibm.com ([9.78.148.93]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s6ENSe3T007217; Mon, 14 Jul 2014 19:28:40 -0400 From: Edjunior Barbosa Machado To: brobecker@adacore.com Cc: gdb-patches@sourceware.org, uweigand@de.ibm.com Subject: Re: [PATCH] Report "No hardware breakpoint support" correctly Date: Tue, 15 Jul 2014 08:12:00 -0000 Message-Id: <1405380516-13496-1-git-send-email-emachado@linux.vnet.ibm.com> In-Reply-To: <20140714161308.GC4888@adacore.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14071423-9564-0000-0000-0000014794DD X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00358.txt.bz2 Thanks Uli and Joel for the feedback. I've just committed the patch below, following Joel's suggestion: https://sourceware.org/ml/gdb-cvs/2014-07/msg00035.html Thanks and regards, -- Edjunior gdb/ 2014-07-14 Edjunior Barbosa Machado * ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Report no hardware breakpoint support correctly. --- gdb/ppc-linux-nat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index fcfd452..6e8994e 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -1473,6 +1473,11 @@ ppc_linux_can_use_hw_breakpoint (struct target_ops *self, } else if (type == bp_hardware_breakpoint) { + if (total_hw_bp == 0) + { + /* No hardware breakpoint support. */ + return 0; + } if (cnt > total_hw_bp) return -1; } -- 1.8.4.2