From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>
Cc: gdb-patches@sourceware.org,
Luis Machado <luisgpm@linux.vnet.ibm.com>,
Matt Tyrlik <tyrlik@us.ibm.com>
Subject: Re: [PATCH 2/4] Hardware accelerated watchpoint conditions
Date: Thu, 24 Dec 2009 18:41:00 -0000 [thread overview]
Message-ID: <20091224184056.GA8545@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <200912232231.01798.bauerman@br.ibm.com>
> --- gdb.orig/gdb/breakpoint.c 2009-12-23 15:14:03.000000000 -0200
> +++ gdb/gdb/breakpoint.c 2009-12-23 17:07:34.000000000 -0200
> @@ -1151,6 +1151,13 @@ update_watchpoint (struct breakpoint *b,
> + enum enable_state e;
> +
> + /* We have to temporary disable this watchpoint, otherwise
> + we will count it twice (once as being inserted, and once
> + as a watchpoint that we want to insert). */
> + e = b->enable_state;
> + b->enable_state = bp_disabled;
>
> i = hw_watchpoint_used_count (bp_hardware_watchpoint,
> &other_type_used);
> @@ -1167,6 +1174,8 @@ update_watchpoint (struct breakpoint *b,
> else
> b->type = bp_hardware_watchpoint;
> }
> + /* Restoring the original state. */
> + b->enable_state = e;
> }
>
> frame_pspace = get_frame_program_space (get_selected_frame (NULL));
Isn't it enough to just reset it before calling hw_watchpoint_used_count by:
b->type = bp_watchpoint;
(It is safer wrt hypothetical error() in the meantime.)
Had such local patch for ppc (this is a code by me but it was a regression, it
was broken before and my fix was just incomplete).
Regards,
Jan
next prev parent reply other threads:[~2009-12-24 18:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-24 0:32 Thiago Jung Bauermann
2009-12-24 18:41 ` Jan Kratochvil [this message]
2009-12-30 3:23 ` Thiago Jung Bauermann
2010-01-04 17:33 ` Thiago Jung Bauermann
2010-01-12 10:51 ` Joel Brobecker
2010-02-04 21:48 ` Thiago Jung Bauermann
2010-02-05 5:16 ` Joel Brobecker
2010-02-08 20:01 ` Thiago Jung Bauermann
2010-02-11 18:24 ` Ulrich Weigand
2010-06-09 4:02 ` Thiago Jung Bauermann
2010-06-09 13:28 ` Ulrich Weigand
2010-06-23 17:21 ` Thiago Jung Bauermann
2010-06-23 19:57 ` Ulrich Weigand
2010-07-01 14:51 ` Thiago Jung Bauermann
2010-07-02 13:20 ` Ulrich Weigand
2010-07-06 22:22 ` Thiago Jung Bauermann
2010-07-07 12:25 ` Ulrich Weigand
2010-07-07 16:21 ` Thiago Jung Bauermann
2010-07-07 16:45 ` Joel Brobecker
2010-07-07 20:37 ` Thiago Jung Bauermann
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=20091224184056.GA8545@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=bauerman@br.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=luisgpm@linux.vnet.ibm.com \
--cc=tyrlik@us.ibm.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