From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: muller@cerbere.u-strasbg.fr
Cc: kettenis@science.uva.nl, gdb-patches@sources.redhat.com
Subject: Re: [RFC] Possible bug with i386 watchpoints on several targets.
Date: Fri, 30 Nov 2001 11:48:00 -0000 [thread overview]
Message-ID: <1858-Fri30Nov2001214802+0200-eliz@is.elta.co.il> (raw)
In-Reply-To: <4.2.0.58.20011130165213.016940c0@ics.u-strasbg.fr>
> Date: Fri, 30 Nov 2001 17:04:58 +0100
> From: Pierre Muller <muller@cerbere.u-strasbg.fr>
>
> use the following command
> (top-gdb) watch gdb_stdout
> (top-gdb) r
> Here you should get a stop due to the setting of gdb_stdout value.
> (top-gdb) cont
> you should now reach the debuggee command prompt,
> simply quit.
> (gdb) quit
> and rerun the same executable without any watchpoint modification.
> (top-gdb) run
> if the bug that I found on both win32 (without i386_cleanup_deregs call)
> and on current (a few days old) CVS for linux.
> You won't get any stop on the second run.
This has nothing to do with i386_cleanup_dregs or, indeed, the x86
watchpoint support. Type "maintenance show-debug-regs", and you will
see that the watchpoint does trigger on the second run, but GDB
ignores it. It ignores the watchpoint because the old and the new
values compare equal on the second run, so GDB thinks it's a false
alarm.
The reason that hardware watchpoints are only considered to fire when
the watched value changes is that hardware watchpoints are treated teh
same as software watchpoints, and software watchpoints obviously
cannot fire unless the watched value changes.
I think it is fundamentally wrong to treat hardware and software
watchpoints in a similar way. I think hardware watchpoints should be
treated like read and access watchpoints, not like software
watchpoints. If others (mainly Michael Snyder) agree, I will submit a
patch that will make that change, and will also solve this particular
problem raised by Pierre.
WARNING: multiple messages have this Message-ID
From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: muller@cerbere.u-strasbg.fr
Cc: kettenis@science.uva.nl, gdb-patches@sources.redhat.com
Subject: Re: [RFC] Possible bug with i386 watchpoints on several targets.
Date: Fri, 23 Nov 2001 06:39:00 -0000 [thread overview]
Message-ID: <1858-Fri30Nov2001214802+0200-eliz@is.elta.co.il> (raw)
Message-ID: <20011123063900.pCwEggPXKJdSqqSm_5l3Nixb87bS-je1xVCDQyuUoHI@z> (raw)
In-Reply-To: <4.2.0.58.20011130165213.016940c0@ics.u-strasbg.fr> (message from Pierre Muller on Fri, 30 Nov 2001 17:04:58 +0100)
> Date: Fri, 30 Nov 2001 17:04:58 +0100
> From: Pierre Muller <muller@cerbere.u-strasbg.fr>
>
> use the following command
> (top-gdb) watch gdb_stdout
> (top-gdb) r
> Here you should get a stop due to the setting of gdb_stdout value.
> (top-gdb) cont
> you should now reach the debuggee command prompt,
> simply quit.
> (gdb) quit
> and rerun the same executable without any watchpoint modification.
> (top-gdb) run
> if the bug that I found on both win32 (without i386_cleanup_deregs call)
> and on current (a few days old) CVS for linux.
> You won't get any stop on the second run.
This has nothing to do with i386_cleanup_dregs or, indeed, the x86
watchpoint support. Type "maintenance show-debug-regs", and you will
see that the watchpoint does trigger on the second run, but GDB
ignores it. It ignores the watchpoint because the old and the new
values compare equal on the second run, so GDB thinks it's a false
alarm.
The reason that hardware watchpoints are only considered to fire when
the watched value changes is that hardware watchpoints are treated teh
same as software watchpoints, and software watchpoints obviously
cannot fire unless the watched value changes.
I think it is fundamentally wrong to treat hardware and software
watchpoints in a similar way. I think hardware watchpoints should be
treated like read and access watchpoints, not like software
watchpoints. If others (mainly Michael Snyder) agree, I will submit a
patch that will make that change, and will also solve this particular
problem raised by Pierre.
next prev parent reply other threads:[~2001-11-30 11:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4.2.0.58.20011121124943.00a4a288@ics.u-strasbg.fr>
[not found] ` <1190-Wed21Nov2001202555+0200-eliz@is.elta.co.il>
2001-11-30 7:18 ` Bug with watchpoints on Linux Pierre Muller
2001-11-21 16:19 ` Pierre Muller
2001-11-21 16:50 ` Eli Zaretskii
2001-11-21 17:07 ` [RFC] Possible bug with i386 watchpoints on several targets Pierre Muller
2001-11-30 8:06 ` Pierre Muller
2001-11-30 11:48 ` Eli Zaretskii [this message]
2001-11-23 6:39 ` Eli Zaretskii
2001-12-03 1:33 ` Pierre Muller
2001-12-03 3:10 ` Eli Zaretskii
2001-12-04 4:09 ` Pierre Muller
2001-12-04 23:50 ` Eli Zaretskii
2001-12-05 1:31 ` Pierre Muller
2001-12-05 3:23 ` Eli Zaretskii
2001-12-05 3:55 ` Pierre Muller
2001-11-30 7:45 ` 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=1858-Fri30Nov2001214802+0200-eliz@is.elta.co.il \
--to=eliz@is.elta.co.il \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@science.uva.nl \
--cc=muller@cerbere.u-strasbg.fr \
/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