summaryrefslogtreecommitdiff
path: root/gdb/nat
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/nat')
-rw-r--r--gdb/nat/linux-procfs.c9
-rw-r--r--gdb/nat/linux-procfs.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/nat/linux-procfs.c b/gdb/nat/linux-procfs.c
index f1493839f60..7599b32ed3e 100644
--- a/gdb/nat/linux-procfs.c
+++ b/gdb/nat/linux-procfs.c
@@ -151,6 +151,15 @@ linux_proc_pid_is_stopped (pid_t pid)
return linux_proc_pid_has_state (pid, "T (stopped)", 1);
}
+/* Detect `T (tracing stop)' in `/proc/PID/status'.
+ Other states including `T (stopped)' are reported as false. */
+
+int
+linux_proc_pid_is_trace_stopped_nowarn (pid_t pid)
+{
+ return linux_proc_pid_has_state (pid, "T (tracing stop)", 1);
+}
+
/* Return non-zero if PID is a zombie. If WARN, warn on failure to
open the /proc file. */
diff --git a/gdb/nat/linux-procfs.h b/gdb/nat/linux-procfs.h
index 979ae0dbd82..c4f57885b1d 100644
--- a/gdb/nat/linux-procfs.h
+++ b/gdb/nat/linux-procfs.h
@@ -36,6 +36,8 @@ extern pid_t linux_proc_get_tracerpid_nowarn (pid_t lwpid);
extern int linux_proc_pid_is_stopped (pid_t pid);
+extern int linux_proc_pid_is_trace_stopped_nowarn (pid_t pid);
+
/* Return non-zero if PID is a zombie. Failure to open the
/proc/pid/status file results in a warning. */