X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <47115BEF.7030407@portugalmail.pt>
Date: Sun, 14 Oct 2007 00:59:43 +0100
From: Pedro Alves <pedro_alves@portugalmail.pt>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: [gdb] Data watchpoints in Windows weirdness.  Call for testers.
References: <4702E6B7.8020100@portugalmail.pt> <20071008124331.GD19254@calimero.vinschen.de> <20071008143552.GA20746@ednor.casa.cgf.cx>
In-Reply-To: <20071008143552.GA20746@ednor.casa.cgf.cx>
Content-Type: multipart/mixed;  boundary="------------090809070400090209060007"
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

--------------090809070400090209060007
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Christopher Faylor escreveu:
> On Mon, Oct 08, 2007 at 02:43:31PM +0200, Corinna Vinschen wrote:
>> On Oct  3 01:47, Pedro Alves wrote:
>>> By a long shot, Cygwin doesn't do anything funny like hooking
>>> GetThreadContext, does it?
>> cgf might be better suited to answer this, but AFAICS, Cygwin
>> doesn't hook any system function.  It just uses them.
> 
> Cygwin doesn't hook GetThreadContext or any other system call.  It does play
> with the threads stack frame when the thread is first created however.
> 
>> OTOH, there are two calls to SetThreadContext in Cygwin, both of them
>> changing Eip.  Could that be a problem?
> 
> Those should only be triggered in circumstances where a cygwin program
> is interrupted outside of the cygwin dll itself.
> 

Thanks guys.  I would imagine that to make a difference the
GetThreadContext in the context of gdb itself would have to be hooked.

Any change someone does the little testing to make sure I'm not
having a local problem here?

as easy as:

gcc main.c -o main.exe -g3 -O0
gdb main.exe
start
watch count
'continue' several times, and send me or post here the results.

A log with the these on would be nice, but not essencial:
set debug infrun 1
set debugevents 1
set debugexceptions 1
maint show-debug-regs 1

Cheers,
Pedro Alves

--------------090809070400090209060007
Content-Type: text/plain;
 name="main.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="main.c"

#include <stdio.h>
#include <windows.h>

volatile int count = 0;

int
main ()
{
  printf ("count %d\n", count);
  count = 999;
  printf ("count %d\n", count);
  count++;

  while (1)
    {
      printf ("count %d\n", count);
      count++;
      Sleep (1000);
    }

  return 0;
}











--------------090809070400090209060007
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--------------090809070400090209060007--

