Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Lerele <lerele@champenstudios.com>
To: Pedro Alves <pedro_alves@portugalmail.pt>
Cc: gdb-patches@sourceware.org
Subject: Re: [gdbserver/win32] (4/11) New interrupting method
Date: Sun, 25 Nov 2007 15:00:00 -0000	[thread overview]
Message-ID: <47498E1A.5070101@champenstudios.com> (raw)
In-Reply-To: <4737B553.2040302@portugalmail.pt>

Pedro Alves escribió:
> Hi,
>
> Here is the new method to stop the inferior, based on a mix of
> Leo's and mine patches.  The idea is simple.  Loop through all
> the inferior threads suspending them.
>
> This version doesn't contain the gdbserver priority handling,
> which means that there is a higher chance of the inferior
> breaking the method, since the operation is not atomic.  For
> example by tweaking its own thread's priorities or if the
> inferior is calling ResumeThread in its own threads while
> gdbserver is stopping them.
>
> The next patch will minimize those chances, by elevating
> gdbserver's priority while stopping the inferior with
> this method.
>
> Leo, did I miss anything?
>
> Regtested on a local i686-pc-cygwin gdbserver.
>
> Cheers,
> Pedro Alves
>
>
>
>
I think this patch breaks interrupt functionality.
The function suspend_one_thread in the new patch does not seem to 
retreive the thread context and sets the thread suspend count to 1, so 
the next call to thread_rec that should happen in gdbserver will get 
incorrect thread context.

My interrupt patch I sent initially used thread_rec to pause the child 
threads, so get context should work here.
I think it's more correct anyway to use thread_rec everywhere so that 
SuspendThread is centralized in one unique function.

Is this correct, or is there something I may have slipped reading your 
patch?

Leo.






  reply	other threads:[~2007-11-25 15:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12  2:07 Pedro Alves
2007-11-25 15:00 ` Lerele [this message]
2007-11-25 18:47   ` Pedro Alves
2007-11-25 20:39     ` Lerele
2007-12-01 18:56 ` Daniel Jacobowitz
2007-12-03  3:53   ` 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=47498E1A.5070101@champenstudios.com \
    --to=lerele@champenstudios.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro_alves@portugalmail.pt \
    /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