From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18378 invoked by alias); 10 Sep 2014 13:09:28 -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 18325 invoked by uid 89); 10 Sep 2014 13:09:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 10 Sep 2014 13:09:26 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8AD9Nqk021270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 Sep 2014 09:09:23 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8AD9LNm011868; Wed, 10 Sep 2014 09:09:22 -0400 Message-ID: <54104D81.8080009@redhat.com> Date: Wed, 10 Sep 2014 13:09:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Gary Benson , gdb-patches@sourceware.org CC: Doug Evans Subject: Re: [PATCH 5/9 v7] Introduce common-regcache.h References: <1409320299-6812-1-git-send-email-gbenson@redhat.com> <1409320299-6812-6-git-send-email-gbenson@redhat.com> In-Reply-To: <1409320299-6812-6-git-send-email-gbenson@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-09/txt/msg00298.txt.bz2 On 08/29/2014 02:51 PM, Gary Benson wrote: > This introduces common-regcache.h. This contains two functions that > allow nat/linux-btrace.c to be simplified. A better long term > solution would be unify the regcache code, but this is sufficient for > now. > > This patch differs from the version I posted on August 1 > (https://sourceware.org/ml/gdb-patches/2014-08/msg00010.html) in that > some suggested documentation changes have been made and that various > updates were required to reflect regcache changes recently committed > by Andreas Arnez. > > gdb/ChangeLog: > > * common/common-regcache.h: New file. > * Makefile.in (HFILES_NO_SRCDIR): Add common/common-regcache.h. > * regcache.h: Include common-regcache.h. > (regcache_read_pc): Don't declare. > * regcache.c (get_thread_regcache_for_ptid): New function. > * nat/linux-btrace.c: Don't include regcache.h. > Include common-regcache.h. > (perf_event_read_bts): Use get_thread_regcache_for_ptid. > > gdb/gdbserver/ChangeLog: > > * regcache.h: Include common-regcache.h. > (regcache_read_pc): Don't declare. > * regcache.c (get_thread_regcache_for_ptid): New function. > diff --git a/gdb/gdbserver/regcache.h b/gdb/gdbserver/regcache.h > index 891fead..0c933f3 100644 > --- a/gdb/gdbserver/regcache.h > +++ b/gdb/gdbserver/regcache.h > @@ -19,6 +19,8 @@ > #ifndef REGCACHE_H > #define REGCACHE_H > > +#include "common-regcache.h" > + > struct thread_info; > struct target_desc; > > @@ -91,8 +93,6 @@ void registers_to_string (struct regcache *regcache, char *buf); > > void registers_from_string (struct regcache *regcache, char *buf); > > -CORE_ADDR regcache_read_pc (struct regcache *regcache); > - Like in the target patches, please leave breadcrumbs pointing to the shared header (here and elsewhere). Otherwise looks good to me too. Thanks, Pedro Alves