aboutsummaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/linux-ptrace.c9
-rw-r--r--gdb/common/linux-ptrace.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/common/linux-ptrace.c b/gdb/common/linux-ptrace.c
index efbd1ea..b140b08 100644
--- a/gdb/common/linux-ptrace.c
+++ b/gdb/common/linux-ptrace.c
@@ -476,6 +476,15 @@ linux_enable_event_reporting (pid_t pid)
(PTRACE_TYPE_ARG4) (uintptr_t) current_ptrace_options);
}
+/* Disable reporting of all currently supported ptrace events. */
+
+void
+linux_disable_event_reporting (pid_t pid)
+{
+ /* Set the options. */
+ ptrace (PTRACE_SETOPTIONS, pid, (PTRACE_TYPE_ARG3) 0, 0);
+}
+
/* Returns non-zero if PTRACE_OPTIONS is contained within
CURRENT_PTRACE_OPTIONS, therefore supported. Returns 0
otherwise. */
diff --git a/gdb/common/linux-ptrace.h b/gdb/common/linux-ptrace.h
index 881d9c9..cffb5ce 100644
--- a/gdb/common/linux-ptrace.h
+++ b/gdb/common/linux-ptrace.h
@@ -86,6 +86,7 @@ struct buffer;
extern void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer);
extern void linux_ptrace_init_warnings (void);
extern void linux_enable_event_reporting (pid_t pid);
+extern void linux_disable_event_reporting (pid_t pid);
extern int linux_supports_tracefork (void);
extern int linux_supports_traceclone (void);
extern int linux_supports_tracevforkdone (void);