From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9968 invoked by alias); 17 Oct 2014 11:23:16 -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 9954 invoked by uid 89); 17 Oct 2014 11:23:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,LIKELY_SPAM_BODY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 17 Oct 2014 11:23:13 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9HBNAT7008420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 17 Oct 2014 07:23:10 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9HBN74E000880; Fri, 17 Oct 2014 07:23:08 -0400 Message-ID: <5440FC1B.6070509@redhat.com> Date: Fri, 17 Oct 2014 11:23:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Sergio Durigan Junior CC: "Jose E. Marchesi" , Doug Evans , gdb-patches@sourceware.org Subject: Re: [PATCH V2 3/9] New commands `enable probe' and `disable probe'. References: <1412961772-16249-1-git-send-email-jose.marchesi@oracle.com> <1412961772-16249-4-git-send-email-jose.marchesi@oracle.com> <21560.22449.803178.90104@ruffy2.mtv.corp.google.com> <878uknun2f.fsf@oracle.com> <5440649C.6080705@redhat.com> <54406623.2020802@redhat.com> <87iojjfmv6.fsf@redhat.com> In-Reply-To: <87iojjfmv6.fsf@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-10/txt/msg00464.txt.bz2 On 10/17/2014 03:31 AM, Sergio Durigan Junior wrote: > On Thursday, October 16 2014, Pedro Alves wrote: > >> This also raises the question, can't we have both a stap >> probe and a dtrace probe with the name provider and name? Like, >> using the proposed output that doesn't distinguish the probe types, >> can't the user end up with the confusing: >> >> Provider Name Where Semaphore Enabled Object >> demo am-main 0x0000000000400c96 n/a /home/jemarch/oracle/usdt/demo >> demo am-main 0x0000000000400c8b n/a always /home/jemarch/oracle/usdt/demo >> >> Does GDB cope correctly with this? Will the user have >> trouble specifying the probe he wants with the current UI? > > Aha, a good question :-P. > > Well, you can actually test this with current GDB, without even needing > dtrace: > > (gdb) info probes > Provider Name Where Semaphore Object > test bla 0x00000000004004f4 a.out > test bla 0x00000000004004f5 a.out > (gdb) b -p bla > Breakpoint 1 at 0x4004f4 (2 locations) > > You have basically two ways of specifying where the probe breakpoint is > going to be located: either by using -probe (or -p), or using > -probe-[type] (or -p[type]). The second way is not problematic, because > you tell GDB that type you want explicitly, so there is no confusion. > However, in the first way, you put a breakpoint in a "probe" (the type > is not important here, only the probe name/provider). GDB will then try > to see if any of the probe backends have probes with this name, and will > put a breakpoint on every probe it finds (again, no matter which type). > > The logic for this is in gdb/probe.c:parse_probes, if you are > interested. > > This is already working (as you can see in my example above), and Jose's > patch does not touch it, so we are pretty much covered in this area. Excellent, thank you. > Nonetheless, I think it is a good idea to add one more field to the > output of 'info probes', specifying the probe type. Thanks, Pedro Alves