This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/3] skip_prolgoue (amd64)
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, Mark Kettenis <mark dot kettenis at xs4all dot nl>, gdb-patches at sourceware dot org
- Date: Thu, 05 Dec 2013 11:30:56 +0000
- Subject: Re: [PATCH 2/3] skip_prolgoue (amd64)
- Authentication-results: sourceware.org; auth=none
- References: <1385735051-27558-1-git-send-email-yao at codesourcery dot com> <1385735051-27558-3-git-send-email-yao at codesourcery dot com> <201311291436 dot rATEaZ5Z030292 at glazunov dot sibelius dot xs4all dot nl> <201311291605 dot rATG5XVb030184 at glazunov dot sibelius dot xs4all dot nl> <52994E79 dot 4000004 at codesourcery dot com> <5299B9D0 dot 2020304 at redhat dot com> <529C37A2 dot 9000207 at codesourcery dot com> <529E9462 dot 9010001 at codesourcery dot com> <529F1B1F dot 2040606 at redhat dot com> <87ob4wr5hv dot fsf at fleche dot redhat dot com>
On 12/04/2013 03:38 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> Actually "non-stop", vs "all-stop" here isn't the ideal
> Pedro> predicate. The real predicate is "is any thread running".
> Pedro> "non-stop" is just being currently used in
> Pedro> prepare_execute_command as proxy for that, just because
> Pedro> that was the easiest.
>
> It seemed to me that the predicate must be "is any thread associated
> with this particular address space running?" -- but I wanted to ask if
> that makes sense, or if that was what you meant. This idea seems to
> open the door to finer-grained cache flushing.
Yes. What I'm getting at is that checking whether in non-stop mode
doesn't even say whether anything is running or not, only that it
could, and that the real predicate revolves around "threads are
running" -- we can go finer-grained from that, though obviously at
the expense of predicate complexity.
Actually, even with target-async/all-stop, the target can also
be running when we get to prepare_execute_command, so the
check for non_stop isn't just being overzealous, it's
actually wrong. We can't actually trigger badness currently,
I think, as with remote/async/all-stop, GDB can't issue RSP commands
to read memory off the target while the target is running, due to
RSP limitation. And with Linux native/async, you can't read
memory off a running process, due to backend limination.
--
Pedro Alves