Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [patch] Fix for newer kernels with: t (tracing stop)
Date: Fri, 22 Jul 2016 15:35:00 -0000	[thread overview]
Message-ID: <3132f4e9-8695-ad54-e0ef-c577dbdaba39@redhat.com> (raw)
In-Reply-To: <20160604122904.GA11651@host1.jankratochvil.net>

On 06/04/2016 01:29 PM, Jan Kratochvil wrote:
> Hi,
> 
> I did provide wrong ptrace data which should fail on their write.
> 	error (_("Unexpected error setting hardware debug registers"));
> But GDB did not print that error, only inferior did hang, because the data was
> not written.
> 
> It is because this error/exception gets suppressed by:
> linux_resume_one_lwp():
> 1578          if (!check_ptrace_stopped_lwp_gone (lp))
> 1579            throw_exception (ex);
> 
> Which happens because check_ptrace_stopped_lwp_gone()
> expects 'T (tracing stop)' while recent Linux kernels
> provide 't (tracing stop)' instad.
> 	What does lowercase t means in ps state code
> 	http://stackoverflow.com/questions/35895886/what-does-lowercase-t-means-in-ps-state-code

Eh, I'm not sure how I ended up with "T (tracing stop)"
in the first place last year, as I think I was on Fedora 20,
and lowercase "t (tracing stop)" is around since 2009.

> 
> Found it on:
> 	kernel-4.4.6-301.fc23.aarch64
> by:
> 	gdb/nat/aarch64-linux-hw-point.c
> 	-  ctrl |= ((1 << len) - 1) << 5;
> 	+  ctrl |= (((1 << len) - 1)&~1) << 5;
> 
> It does not change testsuite results on that F-23.aarch64 machine.
> I see no real regessions on rawhide.x86_64 machine (with F-23 kernel) although
> there were some fuzzy results I will need to check more.
> 
> OK for check-in?

OK.

I wonder whether it wouldn't simplify things to parse the
state into some new enum lwp_state instead of the current scheme
of passing state strings around.  I may give that a try as follow up.

Thanks,
Pedro Alves


  reply	other threads:[~2016-07-22 15:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-04 12:29 Jan Kratochvil
2016-07-22 15:35 ` Pedro Alves [this message]
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       ` [pushed 2/2] linux-procfs: Handle lowercase "t (tracing stop)" state Pedro Alves

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=3132f4e9-8695-ad54-e0ef-c577dbdaba39@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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