Fix magic number in arm-tdep.c
Michael Snyder
msnyder@vmware.com
Wed Mar 2 18:13:00 GMT 2011
Ulrich Weigand wrote:
> Yao Qi wrote:
>
>> * gdb/arm-tdep.c (shifted_reg_val): Replace magic number 15 with
>> ARM_PC_REGNUM.
>> (thumb_get_next_pc_raw, arm_get_next_pc_raw): Likewise.
>> (displaced_write_reg, displaced_read_reg): Likewise.
>> (copy_ldr_str_ldrb_strb, cleanup_block_load_all): Likewise.
>> (cleanup_block_load_pc, copy_block_xfer): Likewise.
>> (cleanup_branch): Replace magic number 14 and 15 with
>> ARM_LR_REGNUM and ARM_PC_REGNUM respectively.
>
> This is OK, but please keep the indentation in cases like:
>
>> - nextpc = (rn == 15) ? pc_val + 8
>> + nextpc = (rn == ARM_PC_REGNUM) ? pc_val + 8
>> : get_frame_register_unsigned (frame, rn);
>
> (? and : should remain in the same column).
>
I don't agree - : is an operator and should be indented by just two
spaces. As emacs does by default.
More information about the Gdb-patches
mailing list