This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PING][RFA-v2] Fix troubles with watchpoints in DJGPP
- From: Pedro Alves <pedro at codesourcery dot com>
- To: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- Cc: gdb-patches at sourceware dot org, "'Eli Zaretskii'" <eliz at gnu dot org>
- Date: Wed, 17 Jun 2009 00:46:22 +0100
- Subject: Re: [PING][RFA-v2] Fix troubles with watchpoints in DJGPP
- References: <001401c9de9f$928b9f80$b7a2de80$@u-strasbg.fr> <200906162359.43456.pedro@codesourcery.com> <000601c9eed8$fcfaa0c0$f6efe240$@u-strasbg.fr>
On Wednesday 17 June 2009 00:20:06, Pierre Muller wrote:
> + ?/* On systems that load no shared libraries, like DJGPP target,
> + ? ? breakpoint_re_set is never called.
> + ? ? Call it now so that ordinary watchpoints get a chance to
> + ? ? become promoted to hardware watchpoints if the pushed target
> + ? ? supports hardware watchpoints. ?*/
> + ?breakpoint_re_set ();
> +
Much, much better, thanks. "systems that load no shared libraries"
still isn't the right predicate, as I demonstrated with the
linux static executable, and the breakpoint_re_set call due to
adding the vsyscall page's symbols. I'd suggest expanding a bit
more. Something like:
/* If the user sets watchpoints before execution having started,
then she gets software watchpoints, because GDB can't know which
target will end up being pushed, or if it supports hardware
watchpoints or not. breakpoint_re_set takes care of promoting
watchpoints to hardware watchpoints if possible, however, if this
new inferior doesn't load shared libraries or we don't pull in
symbols from any other source on this target/arch,
breakpoint_re_set is never called. Call it now so that software
watchpoints get a chance to be promoted to hardware watchpoints
if the now pushed target supports hardware watchpoints. */
breakpoint_re_set ();
(s/ordinary/software/. There's nothing unordinary about hardware watchpoints)
--
Pedro Alves