Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: Yao Qi <yao@codesourcery.com>,
	 "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: Fix magic number in arm-tdep.c
Date: Wed, 02 Mar 2011 18:13:00 -0000	[thread overview]
Message-ID: <4D6E88BC.9080905@vmware.com> (raw)
In-Reply-To: <201103021412.p22EC5vZ015623@d06av02.portsmouth.uk.ibm.com>

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.



  reply	other threads:[~2011-03-02 18:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02  7:10 Yao Qi
2011-03-02 14:12 ` Ulrich Weigand
2011-03-02 18:13   ` Michael Snyder [this message]
2011-03-02 18:30     ` Tom Tromey
2011-03-02 18:32       ` Michael Snyder
2011-03-03  2:20   ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D6E88BC.9080905@vmware.com \
    --to=msnyder@vmware.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    --cc=yao@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox