Re: [PATCH 00/13] Split brekapoint_from_pc to breakpoint_kind_from_pc and sw_breakpoint_from_kind

Pedro Alves
2016-10-27T14:58:21Z

On 10/26/2016 04:43 PM, Yao Qi wrote:
> On Mon, Oct 10, 2016 at 11:17 AM, Yao Qi <qiyaoltc@gmail.com> wrote:
>> On Wed, Aug 31, 2016 at 4:05 PM, Yao Qi <qiyaoltc@gmail.com> wrote:
>>> This patch series is to split gdbarch method brekapoint_from_pc to
>>> methods breakpoint_kind_from_pc and sw_breakpoint_from_kind. After
>>> these changes, new gdbarch methods breakpoint_kind_from_pc and
>>> sw_breakpoint_from_kind are more preferred than brekapoint_from_pc.
>>>
>>> In this patch https://sourceware.org/ml/gdb-patches/2016-05/msg00201.html,
>>> I wanted to remove a global variable arm_override_mode, and the
>>> discussion leads to a design here
>>> https://sourceware.org/ml/gdb-patches/2016-07/msg00211.html In short,
>>> we reuse bp_target_info.placed_size as the "kind" of a breakpoint,
>>> which can be got by gdbarch breakpoint_kind_from_pc or
>>> breakpoint_kind_from_current_state.
>>>
>>> I choose a way that I can change the code incrementally, and make the
>>> review easier. Patch #1, #2, #5, and #8 are obvious, IMO. Patch #7
>>> and #12 do the major work, and the rest are code refactor.
>>>
>>> Regression tested on arm-linux and x86_64-linux. Tests on other
>>> architectures are welcome!
>>>
>>
>> I've pushed patches 1#, #2, and #5 in, because they are obvious.
>> Update patch 7 to cover arc.
>>

So I like this a lot. Thanks again for going through with this
all. And thanks for the patience.

My only question is what happens to the GDBARCH_BREAKPOINT_MANIPULATION
/ SET_GDBARCH_BREAKPOINT_MANIPULATION macros? I was hoping they'd
disappear in the end, but looks like not? (I find the "manipulation"
name to be very opaque here, btw.)

Thanks,
Pedro Alves