From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4915 invoked by alias); 14 Jul 2014 19:35:04 -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 4863 invoked by uid 89); 14 Jul 2014 19:35:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f73.google.com Received: from mail-qa0-f73.google.com (HELO mail-qa0-f73.google.com) (209.85.216.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 14 Jul 2014 19:35:00 +0000 Received: by mail-qa0-f73.google.com with SMTP id s7so426223qap.2 for ; Mon, 14 Jul 2014 12:34:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=W5jHojViyO61CVzWcDvwY3RhjKFkuPAx17O7PA0oH1g=; b=Qg9P4o8t3QIULGKMdAgmzlLUB0nQXLlVTA19bNxBCAM/na0jkWxUp8SP5meO1lNkTT WmBSd0934xF8xX56LiIUGMG66Tx3W+UiYhqAXpZLtCYlasd9ehocEWaVx/zmAs9eoYKB 1jSUidWHkIZjwFFE/R7fiXhx6yVXUr8LQ03a4VhVuFBQrcAzDYpy9UxNeaMqagZASw53 WmdLm3oFTvrBq6HGhQcAYH7X+7GF4t2mlOtiwy8uUVwRYJlpm3pgr4+dNcjWpwfLgqEK n/LCT7uWux0RepRnDSD0iZj35FCfdySPPO+ZJgkhfq1dY0LUGoXgwW1NbHgqzxmqPa4+ H+Yw== X-Gm-Message-State: ALoCoQnDX+w7kxh3HNDrKh4utl1YIRpHiZ1zGjii5GKubWjxH+ssHwpE4E/vByN+LxioS63b1keD X-Received: by 10.236.19.7 with SMTP id m7mr7387049yhm.35.1405366497987; Mon, 14 Jul 2014 12:34:57 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id v44si697634yhv.0.2014.07.14.12.34.57 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Jul 2014 12:34:57 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 7048031C43E; Mon, 14 Jul 2014 12:34:57 -0700 (PDT) From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21444.12512.877645.178584@ruffy.mtv.corp.google.com> Date: Mon, 14 Jul 2014 20:32:00 -0000 To: Gary Benson Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 14/15] Introduce common_get_thread_regcache In-Reply-To: <1404902255-11101-15-git-send-email-gbenson@redhat.com> References: <1404902255-11101-1-git-send-email-gbenson@redhat.com> <1404902255-11101-15-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00355.txt.bz2 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. Cheers.