From patchwork Sat Apr 19 06:54:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 623 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id D9EB736007F for ; Fri, 18 Apr 2014 23:57:47 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14314964) id 89D2D410CD030; Fri, 18 Apr 2014 23:57:47 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx20.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx20.g.dreamhost.com (Postfix) with ESMTPS id 603B5410CD030 for ; Fri, 18 Apr 2014 23:57:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=PHw7LcbuYxXXrqvgXombnxucOJLpX F2uVNS7nBC89fUm55gNCaNEVo3XB6gD6blUEhyyfn+D8Vm+eH/tM/0vCbDbTwKhh yTjtLQPz1cS+Be4Wl6uFYyrPK/K85OxyljeTtGITgaBUWSjQfxs1NWCjp4LloKAe 28fN+m7LugxEo4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=MqGMKWZV//NoFMOffPM/nVnIAtc=; b=mmW 4tpGJZGDWsrM3al9dklgz5FD/R2/S+CQOUWhSg0oFHVadbipf+P9PX5sNDsfr1pi UlAoBsRRt5OxQHCCi9MjrGmQHrBxbRIK446WTMMjxV3PRBxUyN/A0uyGcdKn0ovN iGwnahUHVkkfoccXlQACW3lPvigA4PtyjC2nPcIo= Received: (qmail 23105 invoked by alias); 19 Apr 2014 06:57:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 23093 invoked by uid 89); 19 Apr 2014 06:57:44 -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; Sat, 19 Apr 2014 06:57:43 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WbPDY-000076-CE from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 18 Apr 2014 23:57:40 -0700 Received: from SVR-ORW-FEM-06.mgc.mentorg.com ([147.34.97.120]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 18 Apr 2014 23:57:40 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.2.247.3; Fri, 18 Apr 2014 23:57:39 -0700 From: Yao Qi To: Subject: [PUSHED PATCH] Call post_create_inferior in ctf_open. Date: Sat, 19 Apr 2014 14:54:46 +0800 Message-ID: <1397890486-15148-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in We don't call post_create_inferior at the end of ctf_open. It is an oversight in patch [PATCH 2/2] Create inferior for ctf target. https://sourceware.org/ml/gdb-patches/2014-01/msg01056.html This patch is to call post_create_inferior at the end of ctf_open, like the end of tfile_open. Run gdb.trace tests on x86-linux with babeltrace installed. Patch is pushed in as it is obvious. gdb: 2014-04-19 Yao Qi * ctf.c (ctf_open): Call post_create_inferior. --- gdb/ChangeLog | 4 ++++ gdb/ctf.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6bc9d87..fd9677b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2014-04-19 Yao Qi + * ctf.c (ctf_open): Call post_create_inferior. + +2014-04-19 Yao Qi + * ctf.c (handle_id): New static variable. (ctf_open_dir): Get handle_id from bt_context_add_trace return value. Get the declaration of event "register" and get length diff --git a/gdb/ctf.c b/gdb/ctf.c index 2206e04..25d63c6 100644 --- a/gdb/ctf.c +++ b/gdb/ctf.c @@ -1187,6 +1187,8 @@ ctf_open (char *dirname, int from_tty) merge_uploaded_trace_state_variables (&uploaded_tsvs); merge_uploaded_tracepoints (&uploaded_tps); + + post_create_inferior (&ctf_ops, from_tty); } /* This is the implementation of target_ops method to_close. Destroy