From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128302 invoked by alias); 16 Sep 2015 11:50:23 -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 128263 invoked by uid 89); 16 Sep 2015 11:50:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp14.uk.ibm.com Received: from e06smtp14.uk.ibm.com (HELO e06smtp14.uk.ibm.com) (195.75.94.110) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 16 Sep 2015 11:50:21 +0000 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 Sep 2015 12:50:17 +0100 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 16 Sep 2015 12:50:15 +0100 X-MailFrom: uweigand@de.ibm.com X-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id DC92A2190061 for ; Wed, 16 Sep 2015 12:49:45 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t8GBoENK32374992 for ; Wed, 16 Sep 2015 11:50:14 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t8GBoEFB012231 for ; Wed, 16 Sep 2015 05:50:14 -0600 Received: from oc7340732750.ibm.com (dyn-9-152-213-225.boeblingen.de.ibm.com [9.152.213.225]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t8GBoEE6012224; Wed, 16 Sep 2015 05:50:14 -0600 Received: by oc7340732750.ibm.com (Postfix, from userid 500) id 0A5EA1DA8; Wed, 16 Sep 2015 13:50:14 +0200 (CEST) Subject: Re: [PATCH 1/2] [GDBserver] Fix compiling conditional expressions accessing registers To: qiyaoltc@gmail.com (Yao Qi) Date: Wed, 16 Sep 2015 11:50:00 -0000 From: "Ulrich Weigand" Cc: pierre.langlois@arm.com (Pierre Langlois), gdb-patches@sourceware.org, cole945@gmail.com In-Reply-To: <86y4g6209t.fsf@gmail.com> from "Yao Qi" at Sep 16, 2015 10:15:10 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20150916115014.0A5EA1DA8@oc7340732750.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15091611-0017-0000-0000-0000056FD528 X-SW-Source: 2015-09/txt/msg00367.txt.bz2 Yao Qi wrote: > Pierre Langlois writes: > > > This patch fixes this issue by replacing `gdb_agent_get_raw_reg' with a > > `gdb_agent_get_reg' function which takes the tracepoint context object > > as argument instead of a raw buffer. Additionally, this patch makes > > this function architecture independent by initializing the context's > > regcache early and making `gdb_agent_get_reg' use `collect_register'. > > As a result, the fast tracepoint context object does not need to > > contain the raw register buffer. > > The fix looks reasonable to me as it makes no sense to keep two copies > of registers. I go through this patch, and it looks good to me. It seems to me this was intended as performance optimization to avoid having to do the full regcache setup every time a tracepoint is hit, in case we're not actually tracing registers ... Not sure whether this is a real performance concern for actual use cases though. I don't have any actual measurements ... > This patch invalidates Wei-cheng's patch here > which is > already approved but not committed. > > If Ulirch/Wei-cheng have no objections, this patch can go in. Except for the performance question above, I have no objections. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com