From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9185 invoked by alias); 4 Mar 2014 00:52:53 -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 9175 invoked by uid 89); 4 Mar 2014 00:52:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Mar 2014 00:52:51 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WKdbD-0007Gh-TC from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 03 Mar 2014 16:52:47 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 3 Mar 2014 16:52:47 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Mon, 3 Mar 2014 16:52:06 -0800 Message-ID: <53152341.8060501@codesourcery.com> Date: Tue, 04 Mar 2014 00:52:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Hui Zhu CC: gdb-patches ml Subject: Re: [OB PATCH] target.h (to_traceframe_info): Fix TARGET_DEFAULT_RETURN References: <530CBCED.3000200@mentor.com> In-Reply-To: <530CBCED.3000200@mentor.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00054.txt.bz2 On 02/25/2014 11:55 PM, Hui Zhu wrote: > make-target-delegates target.h >target-delegates.c > git diff target-delegates.c > diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c > index 5b27b59..fdea5d6 100644 > --- a/gdb/target-delegates.c > +++ b/gdb/target-delegates.c > @@ -1297,7 +1297,7 @@ delegate_traceframe_info (struct target_ops *self) > static struct traceframe_info * > tdefault_traceframe_info (struct target_ops *self) > { > - return NULL; > + return tcomplain (); > } > > Committed as obvious. This patch isn't correct to me. > > Thanks, > Hui > > 2014-02-25 Hui Zhu > > * target.h (target_ops): Fix TARGET_DEFAULT_RETURN of > to_traceframe_info. > > diff --git a/gdb/target.h b/gdb/target.h > index db248a8..7ce66c1 100644 > --- a/gdb/target.h > +++ b/gdb/target.h > @@ -976,7 +976,7 @@ struct target_ops > higher layers take care of caching, invalidating, and > re-fetching when necessary. */ > struct traceframe_info *(*to_traceframe_info) (struct target_ops *) > - TARGET_DEFAULT_RETURN (tcomplain ()); > + TARGET_DEFAULT_RETURN (NULL); It is intended to call tcomplain in the default implementation of to_traceframe_info interface, see patch [1] The inconsistency between target.h and target-delegates.c is a good catch, but your fix isn't correct. When patch [1] was being reviewed, Tom pushed the target-delegation patch series, I rebase patch [1] and resolve conflicts. I forgot to re-generate target-delegates.c and it causes the inconsistency you found. Sorry about this. The right fix to me is to revert your patch and run make-target-delegates again so that tdefault_traceframe_info calls tcomplain. [1] [PATCH 8/8] Call target_traceframe_info when traceframe is selected. https://sourceware.org/ml/gdb-patches/2014-02/msg00385.html -- Yao (齐尧)