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


Yao Qi writes:

> 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.
>
Yes I know, I don't see what prevents us to extend it to GDBServer to
protect non-stop operations however ?

>>
>> 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.
>

Right, good point.

>> 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".
>

Same question as above...

>>  - 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.
>
OK.

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

OK thanks, I'll wait for that.


      reply	other threads:[~2016-05-18 11: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 ` [RFC 1/3] make reinsert breakpoint thread specific 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 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
2016-05-18 11:50     ` Antoine Tremblay [this message]

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