From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [pushed 2/2] linux-procfs: Handle lowercase "t (tracing stop)" state
Date: Mon, 25 Jul 2016 12:02:00 -0000 [thread overview]
Message-ID: <1469448109-11200-2-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <20160724200827.GA5193@host1.jankratochvil.net>
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'.
---
gdb/ChangeLog | 6 ++++++
gdb/nat/linux-procfs.c | 3 +++
2 files changed, 9 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0840a69..c346a90 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 5d63e1b..f00fe29 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
--
2.5.5
prev parent reply other threads:[~2016-07-25 12:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-04 12:29 [patch] Fix for newer kernels with: t (tracing stop) Jan Kratochvil
2016-07-22 15:35 ` Pedro Alves
2016-07-22 16:04 ` Pedro Alves
2016-07-24 20:08 ` Jan Kratochvil
2016-07-25 12:02 ` [pushed 1/2] linux-procfs: Introduce enum proc_state Pedro Alves
2016-07-25 12:02 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1469448109-11200-2-git-send-email-palves@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox