Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pierre Muller <muller@cerbere.u-strasbg.fr>
To: gdb@sources.redhat.com
Subject: Re: Bug with watchpoints on Linux
Date: Fri, 09 Nov 2001 18:27:00 -0000	[thread overview]
Message-ID: <4.2.0.58.20011121131718.01644a48@ics.u-strasbg.fr> (raw)
In-Reply-To: <4.2.0.58.20011121130736.016b6e80@ics.u-strasbg.fr>

At 13:12 21/11/2001 , Pierre Muller a écrit:
>At 13:01 21/11/2001 , vous avez écrit:
>
>>   There seems to be a big problem with
>>hardware watchpoints under Linux.
>>
>>   If I compile a simple program :
>>
>>/* START of twatch.c */
>>static int x,y;
>>int
>>main ()
>>{
>>   x = 5;
>>   y = x * 2;
>>   x = y / 2;
>>   x = 7;
>>   return 0;
>>}
>>/* END of twatch.c */
>>and set a hardware watchpoint on variable 'x',
>>the debugger correctly stops at each program location where this global 
>>var is changed.
>>
>>   But at the second run, the program is never stopped because
>>of the changes to this global variable.
>>
>>   It seems like there is a problem with the hardware watchpoint
>>resetting.
>>
>>   I tested this on only one Linux machine,
>>but both the main and the 5.1 branches show this problem.
>>
>>
>>   The current main CVS tree with a patch (not yet submitted)
>>to add hardware watchpoints on cygwin target does not
>>have this problem (It works but there are still some problems).
>
>Whoops, I was too fast once again...
>
>I do see the same problem in my cygwin implementation ...

   I now see :
   only the go32-nat.c code does call
   i386_clean_dregs function.
I didn't have it in my cygwin patch,
and it also does not appear in
any other gdb dir source.

    This is probably the cause of the problem,
it does indeed solve the bug for cygwin if I add this call to
child_mourn_inferior as go32-nat code does.

   Probably the same will fix the bug for linux too, but I can't try this 
out now...



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


  reply	other threads:[~2001-11-21 12:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-09  6:17 Pierre Muller
2001-11-09  7:21 ` Eli Zaretskii
2001-11-09  9:40 ` Pierre Muller
2001-11-09 18:27   ` Pierre Muller [this message]
2001-11-10  9:44     ` Bug with i386 watchpoints Pierre Muller
2001-11-10 11:13       ` Eli Zaretskii
2001-11-11 13:01         ` Pierre Muller
2001-11-10 11:02 ` Bug with watchpoints on Linux Eli Zaretskii

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=4.2.0.58.20011121131718.01644a48@ics.u-strasbg.fr \
    --to=muller@cerbere.u-strasbg.fr \
    --cc=gdb@sources.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