From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1247 invoked by alias); 16 Nov 2011 19:04:55 -0000 Received: (qmail 1025 invoked by uid 22791); 16 Nov 2011 19:04:50 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 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; Wed, 16 Nov 2011 19:04:09 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RQkmH-0006ON-4k from pedro_alves@mentor.com for gdb-patches@sourceware.org; Wed, 16 Nov 2011 11:04:09 -0800 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 16 Nov 2011 19:04:07 +0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch 3/5] Print a message on gdb disconnected. Date: Wed, 16 Nov 2011 19:04:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-12-generic; KDE/4.7.2; x86_64; ; ) Cc: Yao Qi References: <4EC20E2E.6010402@codesourcery.com> <4EC218EC.9090105@codesourcery.com> In-Reply-To: <4EC218EC.9090105@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111161904.05595.pedro@codesourcery.com> 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: 2011-11/txt/msg00444.txt.bz2 On Tuesday 15 November 2011 07:46:52, Yao Qi wrote: > +static void > +process_tracepoint_on_disconnect (void) > +{ > + VEC(breakpoint_p) *tp_vec = NULL; > + int ix; > + struct breakpoint *b; > + int has_pending_p = 0; > + > + /* Check whether we still have pending tracepoint. If we have, warn the > + user that pending tracepoint will no longer work. */ > + tp_vec = all_tracepoints (); > + for (ix = 0; VEC_iterate (breakpoint_p, tp_vec, ix, b); ix++) > + { > + if (b->loc == NULL || b->loc->shlib_disabled) It's not garanteed that the first location is the one that is shlib_disabled. If you want the warning for the shlib_disabled cases, you'll need to iterate over the breakpoint's locations. > + { > + has_pending_p = 1; > + break; > + } > + } > + VEC_free (breakpoint_p, tp_vec); > + > + if (has_pending_p) > + warning (_("Pending tracepoint will not be resolved while" > + " GBD is disconnected\n")); Plural, "Pending tracepoints". Otherwise okay. -- Pedro Alves