This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 8/9] Use reinsert_breakpoint for vCont;s


On 07/05/2016 09:14 AM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
> 
>>> if thread 1 doesn't hit the reinsert breakpoint, we don't have to
>>> remove them, because GDB will send vCont;s:1 next time, and GDBserver
>>
>> There's no guarantee GDB will send vCont;s:1 next time.
>> The user may do "continue" instead of "step".
>>
>>> can only install reinsert breakpoints if they are not installed yet.
>>
>> The user may even do "return + continue" or "jump", or an infcall,
>> all of which resume the thread at a different address from the address
>> the thread last stopped.  So there's no guarantee that the
>> reinsert breakpoint address makes any sense for the next step request,
>> or even that the next resume request is a step in the first place.
>>
>> Basically the previous step request must be completely forgotten after
>> gdb has seen the thread stop.  In all-stop, gdb "sees "all threads
>> stopped on each and every event reported to gdb, for any thread.
>> A stop reply cancels any and all previous resume requests.
> 
> I add some code to delete all reinsert breakpoints for all threads in
> all-stop.  See the patch below,

This version looks good to me.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]