This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/9 V3] Use reinsert breakpoint for vCont;s
- From: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Antoine Tremblay <antoine dot tremblay at ericsson dot com>, Yao Qi <qiyaoltc at gmail dot com>, <gdb-patches at sourceware dot org>
- Date: Fri, 25 Nov 2016 08:57:18 -0500
- Subject: Re: [PATCH 0/9 V3] Use reinsert breakpoint for vCont;s
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=antoine dot tremblay at ericsson dot com;
- References: <1467295765-3457-1-git-send-email-yao.qi@linaro.org> <wwok4m39swrb.fsf@ericsson.com> <20161121120822.GA28605@E107787-LIN> <wwok37ikrgmq.fsf@ericsson.com> <20161124215510.pbsobdtj6niycjhd@localhost> <wwokshqfycjw.fsf@ericsson.com> <wwokr35zya7o.fsf@ericsson.com> <b7eed301-1558-4654-4f1a-a5d009ff0846@redhat.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Pedro Alves writes:
> I'm behind on this whole discussion, but, the comment below
> caught my attention:
>
> On 11/25/2016 01:12 PM, Antoine Tremblay wrote:
>
>> In fact thinking more about this we may need to remove all breakpoints
>> at any pc since get_next_pc may read memory in other places then the
>> current pc to deal with atomic sequences for example or for other
>> instructions too.
>>
>> If it reads a breakpoint in memory there it may come-up with an invalid
>> next pc.
>
> How can that happen, given gdbserver's memory read routine takes
> share to hide breakpoint breakpoints?
>
> I.e., read_inferior_memory -> check_mem_read.
>
Indeed, this is because arm_get_next_pc uses (*the_target->read_memory)
directly.
This should be fixed for read_inferior_memory indeed and it would solve
this issue, sorry I was not so familiar with the check_mem_read hiding
breakpoints/fast tracepoints jumps.
I'm not sure why it uses that directly at the moment, looks like a plain
misstake but I'll dig a bit more.
But it's just what we need this may easily fix that issue in particular!
Thanks,
Antoine