This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix magic number in arm-tdep.c
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: yao at codesourcery dot com (Yao Qi)
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 2 Mar 2011 15:12:05 +0100 (CET)
- Subject: Re: Fix magic number in arm-tdep.c
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).
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com