diff options
author | Tom de Vries <tdevries@suse.de> | 2022-12-31 10:23:06 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-12-31 10:23:06 +0100 |
commit | 08c59458a106038c6d678621e7290948127671e2 (patch) | |
tree | 64912d2f4d83b4eda9fcfe45b757a8063f5ad57b /gdb/doc | |
parent | a667697f36ef4f910e09c4a02f34a44fa3e86157 (diff) | |
download | fsf-binutils-gdb-08c59458a106038c6d678621e7290948127671e2.zip fsf-binutils-gdb-08c59458a106038c6d678621e7290948127671e2.tar.gz fsf-binutils-gdb-08c59458a106038c6d678621e7290948127671e2.tar.bz2 |
[gdb/cli] Add maintenance ignore-probes
There's a command "disable probes", but SystemTap probes, for instance
libc:longjmp cannot be disabled:
...
$ gdb -q -batch a.out -ex start -ex "disable probes libc ^longjmp$"
...
Probe libc:longjmp cannot be disabled.
Probe libc:longjmp cannot be disabled.
Probe libc:longjmp cannot be disabled.
...
Add a command "maintenance ignore-probes" that ignores probes during
get_probes, such that we can easily pretend to use a libc without the
libc:longjmp probe:
...
(gdb) maint ignore-probes -verbose libc ^longjmp$
ignore-probes filter has been set to:
PROVIDER: 'libc'
PROBE_NAME: '^longjmp$'
OBJNAME: ''
(gdb) start ^M
...
Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M
Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M
Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M
...
The "Ignoring ..." messages can be suppressed by not using -verbose.
Note that as with "disable probes", running simply "maint ignore-probes"
ignores all probes.
The ignore-probes filter can be reset by using:
...
(gdb) maint ignore-probes -reset
ignore-probes filter has been reset
...
For now, the command is only supported for SystemTap probes.
PR cli/27159
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27159
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/gdb.texinfo | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 21a00ed..704415b 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -6114,6 +6114,7 @@ disabled, but @code{SystemTap} probes cannot be disabled. You can enable (or disable) one or more probes using the following commands, with optional arguments: +@anchor{enable probes} @table @code @kindex enable probes @item enable probes @r{[}@var{provider} @r{[}@var{name} @r{[}@var{objfile}@r{]}@r{]}@r{]} @@ -40897,6 +40898,27 @@ Like the @code{with} command, but works with @code{maintenance set} variables. This is used by the testsuite to exercise the @code{with} command's infrastructure. +@kindex maint ignore-probes +@item maint ignore-probes [@var{-v}|@var{-verbose}] [@var{provider} [@var{name} [@var{objfile}]]] +@itemx maint ignore-probes @var{-reset} +Set or reset the ignore-probes filter. The @var{provider}, @var{name} +and @var{objfile} arguments are as in @code{enable probes} and +@code{disable probes} (@pxref{enable probes}). Only supported for +SystemTap probes. + +Here's an example of using @code{maint ignore-probes}: +@smallexample +(gdb) maint ignore-probes -verbose libc ^longjmp$ +ignore-probes filter has been set to: +PROVIDER: 'libc' +PROBE_NAME: '^longjmp$' +OBJNAME: '' +(gdb) start +<... more output ...> +Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M +Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M +Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M +@end smallexample @end table The following command is useful for non-interactive invocations of |