On 12/13/22 16:58, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries via Gdb-patches writes: > > Tom> There's a command "disable probes", but SystemTap probes cannot be disabled. > Tom> Add a command "maintenance ignore-probes" that ignores probes during > Tom> get_probes, such that we can easily pretend to use a glibc without say, > Tom> the longjmp probe: > > The idea seems sound to me. > > Tom> Note that as with "disable probes", running "maint ignore-probes" without > Tom> arguments ignores all probes. > > I didn't know about "disable probes" but I see now it's a DTrace thing. > > Tom> +/* Implementation of the `maintenance ignore-probes' command. */ > Tom> + > Tom> +static void > Tom> +ignore_probes_command (const char *arg, int from_tty) > Tom> +{ > Tom> + std::string ignore_provider, ignore_probe_name, ignore_objname; > Tom> + > Tom> + parse_probe_linespec ((const char *) arg, &ignore_provider, > Tom> + &ignore_probe_name, &ignore_objname); > > The cast there isn't needed. I'm going to remove the other casts like > this in a second. > Done. > Also, maybe if arg==nullptr, this could set ignore_probes_p = false? > That would give a way to undo the change. > That functionality is sort of already available as "maint ignore-probes foobar foobar foobar", but agreed, having a reliable and concise way to do it is better. I've added that functionality, but as "maint ignore-probes -reset", to not break the similarity in usage with "disable probes" > Tom> + add_cmd ("ignore-probes", class_maintenance, ignore_probes_command, _("\ > Tom> +Ignore probes.\n\ > Tom> +Usage: ignore probes [PROVIDER [NAME [OBJECT]]]\n\ > > Missing the "-" in "ignore-probes". > As well as the "maintenance" prefix, both fixed. > Tom> +all defined probes. Only supported for SystemTap probes"), > > Probably should end with a "." Done. I've also added a -verbose option. If you're ok with the updates, I'll add the docs part and do a proper submission. Thanks, - Tom