[PATCH V2 3/9] New commands `enable probe' and `disable probe'.
Fri Oct 17 11:23:00 GMT 2014
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
> (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
> 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.
More information about the Gdb-patches