Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro_alves@portugalmail.pt>
To: gdb-patches@sourceware.org, Lerele <lerele@champenstudios.com>
Subject: Re: [gdbserver/wince] (7/11) Make the new interrupt method 	actually  always  work in WinCE
Date: Mon, 03 Dec 2007 03:54:00 -0000	[thread overview]
Message-ID: <47537D21.4080206@portugalmail.pt> (raw)
In-Reply-To: <20071201190044.GF24231@caradoc.them.org>

Daniel Jacobowitz wrote:
> On Mon, Nov 12, 2007 at 02:08:03AM +0000, Pedro Alves wrote:
>> So, what this patch does, is implement the same workaround MSFT's
>> debugger uses.  Don't set the context back to the inferior, unless
>> it has been explicitly changed by gdb or gdbserver.  Actually, it
>> is a little bit better, as it won't crash if the user sets some
>> register's contents back to what it was when the inferior stopped.
> 
> This is all really nasty.  Does this mean the register values we
> report to GDB may actually change before the process stops?
> 

Yes, unfortunatelly, but only on threads that are performing a
syscall.  I still haven't found a way around it, and the fact
that MSFT's debugger has the same behaviour makes me
believe there isn't one.
The values we pass to gdb aren't that random.  The
registers seem to hold the values needed for a syscall, and
are quite similar to what I see when I pause a process
with MSFT's debugger.
A syscall in WinCE ( < 6 at least ) is implemented by
having the kernel sets things up for the thread to
continue execution on a server process, outside kernel
mode.  I suspect that a SuspendThread will only have
effect when the thread is running on the original process.
If it is running on the server process, it will not stop
until the kernel switches it back into the original process.

>> 2007-11-12  Pedro Alves  <pedro_alves@portugalmail.pt>
>>
>> 	* win32-low.c (win32_get_thread_context)
>> 	(win32_set_thread_context): New.
>> 	(thread_rec): Use win32_get_thread_context.
>> 	(continue_one_thread, win32_resume): Use win32_set_thread_context.
>> 	* win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
>> 	field.
> 
> OK, I suppose.
> 

Thanks, checked in.

-- 
Pedro Alves


      reply	other threads:[~2007-12-03  3:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12  2:08 Pedro Alves
2007-12-01 19:01 ` Daniel Jacobowitz
2007-12-03  3:54   ` 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=47537D21.4080206@portugalmail.pt \
    --to=pedro_alves@portugalmail.pt \
    --cc=gdb-patches@sourceware.org \
    --cc=lerele@champenstudios.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