Re: Why enforcing sw_breakpoint_from_kind() implementation in GDBserver targets

Simon Marchi
2020-06-11T14:51:05Z

On 2020-06-11 7:00 a.m., Shahab Vahedi wrote:
> Hi Luis, Simon,
>
> On Thu, Jun 11, 2020 at 07:35:33AM -0300, Luis Machado wrote:
>> On 6/11/20 6:40 AM, Shahab Vahedi via Gdb wrote:
>>> Hi Simon,
>>>
>>> The ARC GDB client inserts the breakpoint by writing to memory (the
>>> legacy way). With your explanations, I plan to add the Z0 packet
>>> support to it. Nevertheless, should it be still necessary to have
>>> "sw_breakpoint_from_kind" in GDBserver as a mandatory method?
>
> Simon, I thought about this a little. Are we aiming for deprecating
> the old way? Then I guess that's the way to go.

If all the gdbserver targets we support do support Z0, then yes I think
we could consider doing that. How would we do it? Make insert_point
and remove_point virtual pure to force sub-classes to implement them
with something meaningful?

Note that this would only concern GDBserver, other server implementations
of the remote protocol are free to support Z0 or not. But we could decide
that all GDBserver ports have to support it.

Simon