diff options
author | Pedro Alves <palves@redhat.com> | 2016-07-25 12:42:18 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-07-25 12:58:38 +0100 |
commit | 0e1a6a5169023ee0c19de2c9160b469e43634b21 (patch) | |
tree | c464c43d9c5585953e69e8444b606763bfb827c3 | |
parent | d617208bb06bd461b52ce041d89f7127e3044762 (diff) | |
download | binutils-gdb-0e1a6a5169023ee0c19de2c9160b469e43634b21.tar.gz |
linux-procfs: Handle lowercase "t (tracing stop)" state
Since Linux 2.6.33, /proc/PID/status shows "t (tracing stop)", with
lowercase 't'. Because GDB is only expecting "T (tracing stop)", GDB
can incorrectly suppress errors in check_ptrace_stopped_lwp_gone:
1578 if (!check_ptrace_stopped_lwp_gone (lp))
1579 throw_exception (ex);
Ref: https://sourceware.org/ml/gdb-patches/2016-06/msg00072.html
2016-07-25 Pedro Alves <palves@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
* nat/linux-procfs.c (parse_proc_status_state): Handle lowercase
't'.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/nat/linux-procfs.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0840a690b76..c346a90b0f2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,4 +1,10 @@ 2016-07-25 Pedro Alves <palves@redhat.com> + Jan Kratochvil <jan.kratochvil@redhat.com> + + * nat/linux-procfs.c (parse_proc_status_state): Handle lowercase + 't'. + +2016-07-25 Pedro Alves <palves@redhat.com> * nat/linux-procfs.c (enum proc_state): New enum. (parse_proc_status_state): New function. diff --git a/gdb/nat/linux-procfs.c b/gdb/nat/linux-procfs.c index 5d63e1b5024..f00fe29374f 100644 --- a/gdb/nat/linux-procfs.c +++ b/gdb/nat/linux-procfs.c @@ -102,7 +102,10 @@ parse_proc_status_state (const char *state) switch (state[0]) { + case 't': + return PROC_STATE_TRACING_STOP; case 'T': + /* Before Linux 2.6.33, tracing stop used uppercase T. */ if (strcmp (state, "T (tracing stop)") == 0) return PROC_STATE_TRACING_STOP; else |