From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24455 invoked by alias); 16 Jul 2014 13:30:13 -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 19920 invoked by uid 89); 16 Jul 2014 13:29:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 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, 16 Jul 2014 13:29: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 s6GDTNkn006046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Jul 2014 09:29:23 -0400 Received: from blade.nx (ovpn-116-88.ams2.redhat.com [10.36.116.88]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6GDTMJ3024291; Wed, 16 Jul 2014 09:29:22 -0400 Received: by blade.nx (Postfix, from userid 1000) id E150C2640C7; Wed, 16 Jul 2014 14:29:21 +0100 (BST) Date: Wed, 16 Jul 2014 13:32:00 -0000 From: Gary Benson To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 14/15] Introduce common_get_thread_regcache Message-ID: <20140716132921.GA16269@blade.nx> References: <1404902255-11101-1-git-send-email-gbenson@redhat.com> <1404902255-11101-15-git-send-email-gbenson@redhat.com> <21444.12512.877645.178584@ruffy.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21444.12512.877645.178584@ruffy.mtv.corp.google.com> X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00420.txt.bz2 Doug Evans wrote: > Gary Benson writes: > > This introduces common_get_thread_regcache so that we can simplify > > nat/linux-btrace.c. A better long term solution would be unify the > > regcache code, but this is sufficient for now. > > > > gdb/ > > 2014-07-09 Tom Tromey > > Gary Benson > > > > * regcache.h (common_get_thread_regcache): Declare. > > * regcache.c (common_get_thread_regcache): New function. > > * nat/linux-btrace.h (common_get_thread_regcache): Declare. > > * nat/linux-btrace.c (perf_event_read_bts): Use > > common_get_thread_regcache. > > When I think of "btrace" I don't think of "regcache". Can > common_get_thread_regcache go some place other than linux-btrace.h? > > Also, why declare the function in two places? I would expect it to > be declared once in a common header. > > Lastly, common_get_thread_regcache feels a bit weird as the name for > this function. get_thread_regcache_for_ptid, or some such, feels > better. I renamed it get_thread_regcache_for_ptid and put it in its own header, common/common-regcache.h. Thanks, Gary -- http://gbenson.net/