From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8503 invoked by alias); 4 Dec 2012 04:45:22 -0000 Received: (qmail 8437 invoked by uid 22791); 4 Dec 2012 04:45:20 -0000 X-SWARE-Spam-Status: No, hits=-4.5 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; Tue, 04 Dec 2012 04:45:14 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TfkNd-0006rT-CS from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 03 Dec 2012 20:45:13 -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); Mon, 3 Dec 2012 20:45:13 -0800 Received: from qiyao.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.1.289.1; Mon, 3 Dec 2012 20:45:10 -0800 From: Yao Qi To: Subject: [PATCH 1/6] Add a field 'installed' for each location of tracepoint. Date: Tue, 04 Dec 2012 04:45:00 -0000 Message-ID: <1354596282-32526-2-git-send-email-yao@codesourcery.com> In-Reply-To: <1354596282-32526-1-git-send-email-yao@codesourcery.com> References: <1354596282-32526-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: 2012-12/txt/msg00048.txt.bz2 Hi, this patch adds a field 'installed' indicating whether a location of tracepoint is installed on target. In CLI, the output of 'info tracepoint' will be like this, info trace Num Type Disp Enb Address What^M 2 tracepoint keep y 0x080485b1 in main at gdb.trace/change-loc.c:29 installed y 4 tracepoint keep y collect $eip 4.1 y 0x0804859c in func4 at gdb.trace/change-loc.h:35 installed y 4.2 y 0xb7ffc480 in func4 at gdb.trace/change-loc.h:35 installed y Of course, the breakpoint related MI notifications are changed as well. gdb: 2012-12-03 Yao Qi * breakpoint.c (print_one_breakpoint_location): Add field 'installed' for each location of a tracepoint. --- gdb/breakpoint.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 53944a6..40d2edd 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -6123,6 +6123,17 @@ print_one_breakpoint_location (struct breakpoint *b, ui_out_field_int (uiout, "pass", t->pass_count); ui_out_text (uiout, " \n"); } + + if (!header_of_multiple) + { + annotate_field (11); + ui_out_text (uiout, "\tinstalled "); + /* LOC is NULL means the tracepoint is still pending, set + field 'installed' 'n'. */ + ui_out_field_string (uiout, "installed", + loc ? (loc->inserted ? "y" : "n") : "n"); + ui_out_text (uiout, " \n"); + } } if (ui_out_is_mi_like_p (uiout) && !part_of_multiple) -- 1.7.7.6