From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31687 invoked by alias); 5 Mar 2014 01:17:07 -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 31674 invoked by uid 89); 5 Mar 2014 01:17:06 -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; Wed, 05 Mar 2014 01:17:05 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WL0SD-0006g4-PP from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 04 Mar 2014 17:17:01 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 4 Mar 2014 17:17:01 -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; Tue, 4 Mar 2014 17:16:18 -0800 Message-ID: <53167A7F.1060702@codesourcery.com> Date: Wed, 05 Mar 2014 01:17: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> <53152341.8060501@codesourcery.com> <531529CB.2020400@mentor.com> <53152E0B.9090107@codesourcery.com> In-Reply-To: <53152E0B.9090107@codesourcery.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00099.txt.bz2 On 03/04/2014 09:36 AM, Yao Qi wrote: > No, we should use TARGET_DEFAULT_NORETURN instead of > TARGET_DEFAULT_RETURN, which is a mistake when I resolved conflicts. > > struct traceframe_info *(*to_traceframe_info) (struct target_ops *) > TARGET_DEFAULT_NORETURN (tcomplain ()); Here is a patch to do so. Regression tested on x86_64-linux. I'll push it in in two days. From: Yao Qi Date: Tue, 4 Mar 2014 17:39:10 +0800 Subject: [PATCH] Change the default implementation of to_traceframe_info to tcomplain This patch is to change the default implementation of to_traceframe_info from 'return NULL' to tcomplain, which is intended. If new target supports tracepoint, this method should be implemented, otherwise, an error is thrown. gdb: 2014-03-04 Yao Qi * target.h (struct target_ops) : Use TARGET_DEFAULT_NORETURN (tcomplain ()). * target-delegates.c: Regenerated. --- gdb/target-delegates.c | 2 +- gdb/target.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 5b27b59..3ca24b7 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; + tcomplain (); } static int diff --git a/gdb/target.h b/gdb/target.h index ab797b2..91f0cc9 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -950,7 +950,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 (NULL); + TARGET_DEFAULT_NORETURN (tcomplain ()); /* Ask the target to use or not to use agent according to USE. Return 1 successful, 0 otherwise. */ -- 1.7.7.6