From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12176 invoked by alias); 17 Apr 2013 17:05:03 -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 12167 invoked by uid 89); 17 Apr 2013 17:05:02 -0000 X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Apr 2013 17:05:02 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3HH4xJI003593 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Apr 2013 13:04:59 -0400 Received: from psique (ovpn-113-115.phx2.redhat.com [10.3.113.115]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3HH4uPk014963 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 17 Apr 2013 13:04:58 -0400 From: Sergio Durigan Junior To: lgustavo@codesourcery.com Cc: "'gdb-patches\@sourceware.org'" Subject: Re: [PATCH, ppc] Fix hw *points for embedded ppc in a threaded environment References: <516EC58C.5060501@codesourcery.com> X-URL: http://www.redhat.com Date: Thu, 18 Apr 2013 00:19:00 -0000 In-Reply-To: <516EC58C.5060501@codesourcery.com> (Luis Machado's message of "Wed, 17 Apr 2013 17:53:48 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-04/txt/msg00544.txt.bz2 Hey! Thank for the patch. One thing I noticed: On Wednesday, April 17 2013, Luis Machado wrote: > Index: gdb-head/gdb/ppc-linux-nat.c > =================================================================== > --- gdb-head.orig/gdb/ppc-linux-nat.c 2013-04-17 10:24:52.919499117 +0200 > +++ gdb-head/gdb/ppc-linux-nat.c 2013-04-17 11:12:20.731448515 +0200 > @@ -2179,6 +2179,21 @@ ppc_linux_new_thread (struct lwp_info *l > for (i = 0; i < max_slots_number; i++) > if (hw_breaks[i].hw_break) > booke_insert_point (hw_breaks[i].hw_break, tid); Didn't you forget to delete the previous line? :-) > + { > + /* The ppc Linux kernel causes a thread to inherit its parent > + thread's debug state, and that includes any hardware > + watchpoints or breakpoints that the parent thread may have set. > + > + For this reason, the debug state of the new thread is cleared > + before trying to replicate any hardware watchpoints or > + breakpoints contained in other threads. */ > + > + /* The ppc debug resource accounting is done through "slots". > + Ask the kernel the deallocate this specific *point's slot. */ > + ptrace (PPC_PTRACE_DELHWDEBUG, tid, 0, hw_breaks[i].slot); > + > + booke_insert_point (hw_breaks[i].hw_break, tid); > + } -- Sergio