From: Doug Evans <xdje42@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v3 2/5] PR breakpoints/7143 - Watchpoint does not trigger when first set
Date: Sun, 16 Mar 2014 03:41:00 -0000 [thread overview]
Message-ID: <CAP9bCMTj+A2B6cvwYKC2vjL1Si+yGBKXvQfCMNR0SYN19KztXg@mail.gmail.com> (raw)
In-Reply-To: <1394154640-14053-3-git-send-email-palves@redhat.com>
On Thu, Mar 6, 2014 at 5:10 PM, Pedro Alves <palves@redhat.com> wrote:
> [...]
> gdb/
> 2014-03-06 Pedro Alves <palves@redhat.com>
>
> PR breakpoints/7143
> * breakpoint.c (should_be_inserted): Don't insert breakpoints that
> are being stepped over.
> (breakpoint_address_match): Make extern.
> * breakpoint.h (breakpoint_address_match): New declaration.
> * inferior.h (stepping_past_instruction_at): New declaration.
> * infrun.c (struct step_over_info): New type.
> (step_over_info): New global.
> (set_step_over_info, clear_step_over_info)
> (stepping_past_instruction_at): New functions.
> (handle_inferior_event): Clear the step-over info when
> trap_expected is cleared.
> (resume): Remove now stale comment.
> (clear_proceed_status): Clear step-over info.
> (proceed): Adjust step-over handling to set or clear the step-over
> info instead of removing all breakpoints.
> (handle_signal_stop): When setting up a thread-hop, don't remove
> breakpoints here.
> (stop_stepping): Clear step-over info.
> (keep_going): Adjust step-over handling to set or clear step-over
> info and then always inserting breakpoints, instead of removing
> all breakpoints when stepping over one.
>
> gdb/testsuite/
> 2014-03-06 Pedro Alves <palves@redhat.com>
>
> PR breakpoints/7143
> * gdb.base/watchpoint.exp: Mention bugzilla bug number instead of
> old gnats gdb/38. Remove kfail. Adjust to use gdb_test instead
> of gdb_test_multiple.
> * gdb.cp/annota2.exp: Remove kfail for gdb/38.
> * gdb.cp/annota3.exp: Remove kfail for gdb/38.
Hi. Ok by me with one nit.
I do like the functions that set/clear the step-over info.
> [...]
> diff --git a/gdb/infrun.c b/gdb/infrun.c
> index bd55505..b7c02d7 100644
> --- a/gdb/infrun.c
> +++ b/gdb/infrun.c
> @@ -977,6 +977,76 @@ static CORE_ADDR singlestep_pc;
> static ptid_t saved_singlestep_ptid;
> static int stepping_past_singlestep_breakpoint;
>
> +/* Info about an instruction that is being stepped over. Invalid if
> + ASPACE is NULL. */
> +
> +struct step_over_info
> +{
> + /* The instruction's address space. */
> + struct address_space *aspace;
> +
> + /* The instruction's address. */
> + CORE_ADDR address;
> +};
> +
> +/* The step-over info of the location that is being stepped over.
> +
> + Note that with async/breakpoint always-inserted mode, a user might
> + set a new breakpoint/watchpoint/etc. exactly while a breakpoint is
> + being stepped over. As setting a new breakpoint inserts all
> + breakpoints, we need to make sure the breakpoint being stepped over
> + isn't inserted then. We do that by only clearing the step-over
> + info when the step-over is actually finished (or aborted).
> +
> + Presently GDB can only step over a breakpoint at any given time.
I realize this is nitpicky, but can you reword this as:
Presently GDB can only step over one breakpoint at any given time.
I realize it's saying the same thing, but when I first read it I had
to read it a couple of times to make sure I read it right. Maybe it's
just me.
next prev parent reply other threads:[~2014-03-16 3:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 1:10 [PATCH v3 0/5] Fix lost events, and handle multiple step-overs Pedro Alves
2014-03-07 1:10 ` [PATCH v3 3/5] Fix for even more missed events; eliminate thread-hop code Pedro Alves
2014-03-07 1:10 ` [PATCH v3 4/5] Handle multiple step-overs Pedro Alves
2014-03-07 1:10 ` [PATCH v3 1/5] Fix missing breakpoint/watchpoint hits, eliminate deferred_step_ptid Pedro Alves
2014-03-07 1:10 ` [PATCH v3 2/5] PR breakpoints/7143 - Watchpoint does not trigger when first set Pedro Alves
2014-03-16 3:41 ` Doug Evans [this message]
2014-03-17 17:11 ` Pedro Alves
2014-03-19 16:52 ` Doug Evans
2014-03-20 13:58 ` Pedro Alves
2014-03-20 13:57 ` Pedro Alves
2014-06-17 19:18 ` Regression for watchpoint-fork.exp [Re: [PATCH v3 2/5] PR breakpoints/7143 - Watchpoint does not trigger when first set] Jan Kratochvil
2014-06-18 10:43 ` Pedro Alves
2014-06-19 13:43 ` Jan Kratochvil
2014-06-19 15:02 ` Pedro Alves
2014-06-19 16:56 ` Pedro Alves
2014-06-19 17:00 ` Jan Kratochvil
2014-06-20 16:53 ` [PATCH] x86 Linux watchpoints: Couldn't write debug register: Invalid, argument Pedro Alves
2014-06-20 17:45 ` Tom Tromey
2014-06-20 17:52 ` Pedro Alves
2014-06-20 17:53 ` Tom Tromey
2014-06-22 18:31 ` Jan Kratochvil
2014-06-23 17:41 ` Pedro Alves
2014-06-23 17:44 ` Pedro Alves
2014-03-07 1:10 ` [PATCH v3 5/5] Make signal-while-stepping-over-bp-other-thread.exp run against remote targets too Pedro Alves
2014-03-20 13:59 ` [PUSHED] Re: [PATCH v3 0/5] Fix lost events, and handle multiple step-overs Pedro Alves
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=CAP9bCMTj+A2B6cvwYKC2vjL1Si+yGBKXvQfCMNR0SYN19KztXg@mail.gmail.com \
--to=xdje42@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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