From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 608 invoked by alias); 9 Mar 2013 03:49:13 -0000 Received: (qmail 493 invoked by uid 22791); 9 Mar 2013 03:49:11 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 09 Mar 2013 03:49:04 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UEAmK-0003cy-LN from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 08 Mar 2013 19:49:00 -0800 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 8 Mar 2013 19:49:00 -0800 Received: from qiyao.dyndns.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Fri, 8 Mar 2013 19:48:59 -0800 From: Yao Qi To: Subject: [PATCH v3 08/15] Write 'stop_desc' of trace status to tfile Date: Sat, 09 Mar 2013 03:49:00 -0000 Message-ID: <1362800844-27940-9-git-send-email-yao@codesourcery.com> In-Reply-To: <1362800844-27940-1-git-send-email-yao@codesourcery.com> References: <1362800844-27940-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes 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 X-SW-Source: 2013-03/txt/msg00398.txt.bz2 The field "stop_desc" of "struct trace_status" is parsed (in parse_trace_status) when the stop reason is tstop_command or tracepoint_error. However, the "stop_desc" is only written to tfile when stop_reason is tracepoint_error. Here is an inconsistency. This patch fixes this inconsistency, as a result, the "tstatus" output on tfile target is the same as its output on live target. gdb: 2013-03-08 Yao Qi * tracepoint.c (tfile_write_status): Write 'stop_desc' of trace status to tfile if trace is stopped by command 'tstop'. --- gdb/tracepoint.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 2525b1b..850adb9 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -3058,7 +3058,8 @@ tfile_write_status (struct trace_file_writer *self, fprintf (writer->fp, "status %c;%s", (ts->running ? '1' : '0'), stop_reason_names[ts->stop_reason]); - if (ts->stop_reason == tracepoint_error) + if (ts->stop_reason == tracepoint_error + || ts->stop_reason == tstop_command) { char *buf = (char *) alloca (strlen (ts->stop_desc) * 2 + 1); -- 1.7.7.6