Re: [PATCH v3 2/5] Support breakpoint kinds for software breakpoints in GDBServer.

Antoine Tremblay
2015-10-21T13:12:08Z

On 10/21/2015 09:04 AM, Pedro Alves wrote:
> On 10/21/2015 01:03 PM, Antoine Tremblay wrote:
>>
>>
>>> This comment should be expanded. Something like:
>>>
>>> /* The software breakpoint's kind. This is target specific.
>>> Most architectures only use one specific instruction for software
>>> breakpoints, while others may use more than one. E.g., on ARM, we
>>> need to set different breakpoint instructions on Thumb, Thumb-2,
>>> and ARM code. */
>>> int kind;
>>>
>>
>> I will remove the "software" specification since hardware breakpoints
>> have kinds too encoded in this struct see for example :
>> arm_linux_hw_point_initialize.
>>
>> Like so :
>>
>> /* The breakpoint's kind. This is target specific. Most
>> architectures only use one specific instruction for breakpoints, while
>> others may use more than one. E.g., on ARM, we need to set different
>> breakpoint instructions on Thumb, Thumb-2, and ARM code. */
>>
>
> Ah. Hmm, but if we only remove the "software" word and continue only talking
> about "instructions", then I think it ends up the same. How about extending
> it like this:
>
> /* The breakpoint's kind. This is target specific. Most
> architectures only use one specific instruction for breakpoints, while
> others may use more than one. E.g., on ARM, we need to use different
> breakpoint instructions on Thumb, Thumb-2, and ARM code. Likewise for
> hardware breakpoints -- some architectures (including ARM) need to
> setup debug registers differently depending on mode. */
>

Sounds good to me.