This is the mail archive of the
mailing list for the GDB project.
[RFC] Possible bug with i386 watchpoints on several targets.
- From: Pierre Muller <muller at cerbere dot u-strasbg dot fr>
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>, Mark Kettenis <kettenis at science dot uva dot nl>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 30 Nov 2001 17:04:58 +0100
- Subject: [RFC] Possible bug with i386 watchpoints on several targets.
- References: <firstname.lastname@example.org><email@example.com><firstname.lastname@example.org><email@example.com>
At 16:45 30/11/2001 , Eli Zaretskii a écrit:
> > Date: Fri, 30 Nov 2001 16:17:27 +0100
> > From: Pierre Muller <firstname.lastname@example.org>
> > What do we do about this?
> > I proposed to add a call to i386_cleanup_dregs
> > for all targets using the standard
> > i386 hardware watchpoints, but
> > Eli seems still not convinced by my reports....
>You don't need to convince me (the port I'm responsible for _does_
>use i386_cleanup_dregs, after all ;-). You need to convince Mark
>Kettenis. I'm sure that if you post a test program and a full recipe
>to reproduce the problem, and then show the patch which makes the
>problem go away, Mark will happily accept it.
The way to check if the bug exist is easy:
take gdb (5.1 or current snapshot)
compiled with debug info and
on the newly generated executable.
(preferabily in the compilation dir,
which will ensure that you get (top-gdb) prompt
for the debugger and (gdb) for the debuggee).
use the following command
(top-gdb) watch gdb_stdout
Here you should get a stop due to the setting of gdb_stdout value.
you should now reach the debuggee command prompt,
and rerun the same executable without any watchpoint modification.
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.
The fix is not that obvious, because I am still a bit unclear
about wher it should be put:
the i386_cleanup_dregs should be called (in my opinion)
both when a program is killed and when a program
But linux does seem to use generic_mourn_inferior,
so for this target it would probably require that we
change this into a target specific function.
PS: Eli, did you check the go32v2 target if you kill the program after
the watchpoint is reached, sorry, I still can't get GDB to compile for djgpp
on my win2000.
Institut Charles Sadron
F 67083 STRASBOURG CEDEX (France)
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99