From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1028 invoked by alias); 4 Mar 2014 01:18:11 -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 1009 invoked by uid 89); 4 Mar 2014 01:18:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 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 01:18:09 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WKdzi-0004Gf-2e from Hui_Zhu@mentor.com for gdb-patches@sourceware.org; Mon, 03 Mar 2014 17:18:06 -0800 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 3 Mar 2014 17:18:06 -0800 Received: from localhost.localdomain (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Mon, 3 Mar 2014 17:18:04 -0800 Message-ID: <531529CB.2020400@mentor.com> Date: Tue, 04 Mar 2014 01:18:00 -0000 From: Hui Zhu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches ml Subject: Re: [OB PATCH] target.h (to_traceframe_info): Fix TARGET_DEFAULT_RETURN References: <530CBCED.3000200@mentor.com> <53152341.8060501@codesourcery.com> In-Reply-To: <53152341.8060501@codesourcery.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00055.txt.bz2 On 03/04/14 08:50, Yao Qi wrote: > 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. I cannot understand about this OB is not right. I have 2 questions to you: 1. Before my patch, does target-delegates.c that generated by make-target-delegates is same with current target-delegates.c? 2. Does this new target-delegates.c that generated by make-target-delegates can be built success? Thanks, Hui > > 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 >