Re: [PATCH v3 4/5] Refactor the breakpoint definitions in linux-arm-low.c.

Pedro Alves
2015-10-21T11:19:15Z

On 10/20/2015 05:48 PM, Antoine Tremblay wrote:
> Before arm_breakpoint_from_pc would use an #ifdef to return the right
> arm_breakpoint from the abi or eabi breakpoint type.
>
> arm_breakpoint_at would also check for the arm_breakpoint ||
> arm_eabi_breakpoint.
>
> Thus the selected arm_breakpoint would be what arm_breakpoint_from_pc returned
> and arm_breakpoint was arm_abi_breakpoint.
>
> This patch makes it more clear by naming those for what they are : 2 separate
> entities: arm_abi_breakpoint and arm_eabi_breakpoint and set the current used
> one as arm_breakpoint.
>
> This allows a cleaner arm_breakpoint_from_pc as it just returns arm_breakpoint
> rather than having the #ifdef in that function.
>
> Any other reference to the arm_breakpoint can now also be clear of #ifdefs...

The text above needs to be updated per the new target method names.

>
> No regressions on Ubuntu 14.04 on ARMv7 and x86.
> With gdbserver-{native,extended} / { -marm -mthumb }
>
> gdb/gdbserver/ChangeLog:
> * linux-arm-low.c: Refactor breakpoint definitions.
> (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
> (arm_breakpoint_from_pc): Adjust for arm_breakpoint.

Likewise.

Otherwise LGTM.

Thanks,
Pedro Alves