Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Antoine Tremblay <antoine.tremblay@ericsson.com>
Cc: Yao Qi <qiyaoltc@gmail.com>,  <gdb-patches@sourceware.org>
Subject: Re: [RFC 0/3] Use reinsert breakpoint for vCont;s
Date: Wed, 18 May 2016 07:50:00 -0000	[thread overview]
Message-ID: <867ferajqb.fsf@gmail.com> (raw)
In-Reply-To: <wwokfutg3hge.fsf@ericsson.com> (Antoine Tremblay's message of	"Tue, 17 May 2016 10:08:33 -0400")

Antoine Tremblay <antoine.tremblay@ericsson.com> writes:

> I think like you did in patch 2 before we know we're reporting to GDB
> the right place too, but adding a
> prepare_to_access_memory/done_accessing_memory lock around the delete /
> insert reinsert breakpoints is needed.

prepare_to_access_memory and done_accessing_memory are used when *GDB*
wants to access memory, not GDBserver.

>
> Actually pretty much the only thing that single step reinsert breakpoints have
> in common with step over reinsert breakpoints is that they're
> inserted as a GDBServer breakpoint. No other code path is the same, afaick.
>

They use the_low_target.get_next_pcs to know the next pcs.

> I think it would be more clear to have a different kind of breakpoint so that :
>
>  - We can protect these breakpoints with prepare_to_access_memory
>  without affecting the step over reinsert breakpoints, that do not need this.

prepare_to_access_memory can't be used here, because it is "prepare for
the memory access requested by GDB".

>  - Have these breakpoints thread specific, again something that
>  step-over breakpoints do not need.

Nowadays, we do step-over once per thread, so it is not harmful to make
reinsert breakpoint thread specific.

>
> The added logic to the control flow should be about the same or less
> than by sharing the reinsert_breakpoints.
>
> Also, when changing code related to either of the 2 scenarios we would not
> fear breaking one or the other. Things are already mangled enough
> in that area ?

I don't think we can deal with the control flow or logic separately,
because we add breakpoint for vCont;s, and breakpoint and event
management should be done in linux_wait_1 and linux_resume.  Adding a
new kind of breakpoint doesn't help, IMO.

I've got a regression-free patch series, but need to remove some
redundant code, and post the out for review.

-- 
Yao (齐尧)


  parent reply	other threads:[~2016-05-18  7:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 10:32 Yao Qi
2016-05-06 10:32 ` [PATCH 3/3] [GDBserver] Support vCont s and S actions with software single step Yao Qi
2016-05-06 10:32 ` [RFC 1/3] make reinsert breakpoint thread specific Yao Qi
2016-05-06 10:32 ` [RFC 2/3] use reinsert breakpoint for vCont;s Yao Qi
2016-05-11 10:41   ` Yao Qi
2016-05-12 13:25     ` Antoine Tremblay
2016-05-13 12:12       ` Antoine Tremblay
     [not found]     ` <wwokeg97l6fe.fsf@ericsson.com>
2016-05-12 16:38       ` Yao Qi
2016-05-09 15:17 ` [RFC 0/3] Use " Antoine Tremblay
2016-05-10 13:29   ` Antoine Tremblay
2016-05-11  8:35     ` Yao Qi
2016-05-11 12:08       ` Antoine Tremblay
     [not found] ` <wwokfutg3hge.fsf@ericsson.com>
2016-05-18  7:50   ` Yao Qi [this message]
2016-05-18 11:50     ` Antoine Tremblay

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=867ferajqb.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=antoine.tremblay@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    /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