From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8770 invoked by alias); 30 Jan 2014 05:46:35 -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 8760 invoked by uid 89); 30 Jan 2014 05:46:34 -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,FROM_12LTRDOM 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; Thu, 30 Jan 2014 05:46:32 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1W8kSK-0003Pm-TW from Yao_Qi@mentor.com ; Wed, 29 Jan 2014 21:46:28 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 29 Jan 2014 21:46:28 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Wed, 29 Jan 2014 21:46:27 -0800 From: Yao Qi To: CC: Subject: [PATCH 0/2] Create inferior fro trace file target Date: Thu, 30 Jan 2014 05:46:00 -0000 Message-ID: <1391060652-10870-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg01054.txt.bz2 Marc reported that Eclipse is unable to load trace file with GDB 7.7, but it works with GDB 7.6. https://sourceware.org/ml/gdb/2014-01/msg00031.html This change is caused by my patch: [RFC] Don't create inferior in tfile target. https://sourceware.org/ml/gdb-patches/2013-05/msg00068.html because I didn't think inferior should be created when a tracefile is loaded. On 01/30/2014 04:56 AM, Marc Khouzam wrote: > The trace file processing is based on the core file one, which shows > the execution tree after the core file is loaded. > But reading your mail makes me think that it makes sense that > when loading a trace file there would be no inferior or thread yet. > However, when selecting a trace record, then we would need > to see the inferior and thread. This is not the case with 7.7. I don't know why trace file processing is based on the core file. They are different, IMO. > > To me, trace records are like a limited core file: > a snapshot of a specific point of the execution. So, when looking > at a trace record, just like when looking at a core file, we want > to show the execution hierarchy, i.e., the process and thread > where the record was collected. The corefile has information about thread and process, but trace file doesn't. Thread and process is not mentioned in the "Trace File Format" doc https://sourceware.org/gdb/current/onlinedocs/gdb/Trace-File-Format.html Keeping trace file similar to core file is unspecified, and their code are total independent to each other. It is not good for Eclipse to assume that, unless we can extend trace file format to include the process id and the thread id in each trace frame. Anyway, it is not a good time to discuss about trace file format and how Eclipse should handle trace file. Let me focus on this problem and patches at first :). Reverting my patch works, which is included in patch 1/2. In patch 2/2, I add something similar to ctf target, and a test case. Patches are regression tested on x86_64-linux. They are also tested on x86-linux with babeltrace installed. In short, Eclipse replies on an undocumented GDB behavior, that GDB should provide inferior and thread when reading a trace file while I don't think GDB has to. If global maintainers think GDB 7.7 shouldn't break Eclipse, then we should pick these two patches up. These two patches bring an issue for multi-target support, say if GDB opens two trace files in two targets, what is the expected output of "info inferiors" and "info threads"? *** BLURB HERE *** Yao Qi (2): Create inferior for tfile target Create inferior for ctf target. gdb/ctf.c | 24 ++++++++++++++++++++++++ gdb/testsuite/gdb.trace/report.exp | 7 ++++++- gdb/testsuite/gdb.trace/tfile.exp | 3 --- gdb/tracepoint.c | 19 +++++++++++++++++++ 4 files changed, 49 insertions(+), 4 deletions(-) -- 1.7.7.6