On 02/18/2011 02:06 PM, Yao Qi wrote: >>> >> (cleanup_branch): Replace magic number by macros. >> > >>> >> - ULONGEST pc = displaced_read_reg (regs, from, 15); >>> >> - displaced_write_reg (regs, dsc, 14, pc - 4, CANNOT_WRITE_PC); >>> >> + ULONGEST pc = displaced_read_reg (regs, from, ARM_PC_REGNUM); >>> >> + displaced_write_reg (regs, dsc, ARM_LR_REGNUM, pc - 4, CANNOT_WRITE_PC); >> > >> > I'm not sure about this change -- other callers just pass in plain >> > register numbers as well ... Either those should all be changed, >> > or none of them. In any case, this is really an unrelated change, >> > and should be done -if at all- in a separate patch. >> > > I'll remove this chunk from my patch, and create another patch specific > to this 'magic number' problem separately. When writing patches for thumb displaced stepping, I find some registers number are magic numbers. This patch is to replace them with corresponding macros. This change is probably obvious, but, I'd ask for a review. -- Yao (齐尧)