This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PPC - Stepping off breakpoints in non-stop mode


> 2008-06-25  Luis Machado  <luisgpm@br.ibm.com>
> 
> 	* rs6000-tdep.c (ppc_displaced_step_fixup): New function.
> 	(deal_with_atomic_sequence): Update BC masks.
> 	(rs6000_gdbarch_init): Init displaced stepping infra-structure.
> 	Define BRANCH_MASK, B_INSN, BC_INSN, BXL_INSN, BP_MASK and BP_INSN.

Yep, this looks great. Could you just double-check the formatting of
a couple of comments before you commit? These darn tabs sometimes
confuse me when they are combined with diff markers...

> +  /* Offset for non-PC relative instructions.  */

Should the hyphen be between "PC" and "relative"?
(I-am-not-an-English-native-speaker alert!).

> +	      /* AA bit indicating whether this is an absolute addressing or
> +	      PC-relative.  */

I think there are a couple of spaces missing at the beginning of the
second line. Also, perhaps a comment that says that the bit isn't set
and therefore the addressing is [...] might be helpful? (just an idea,
you don't have to followup if you disagree).

> +	      if (debug_displaced)
> +		fprintf_unfiltered (gdb_stdlog,
> +			    "displaced: (ppc) branch instruction: 0x%s\n"
> +			    "displaced: (ppc) adjusted PC from 0x%s to 0x%s\n",
> +			    paddr_nz (insn), paddr_nz (current_pc),
> +			    paddr_nz (from + offset));

I missed that part in my previous review. The formatting should be:

		fprintf_unfiltered
		  (gdb_stdlog,
		   "displaced: (ppc) branch instruction: 0x%s\n"
		   "displaced: (ppc) adjusted PC from 0x%s to 0x%s\n",
		   paddr_nz (insn), paddr_nz (current_pc),
		   paddr_nz (from + offset));



> +	  /* LK bit Indicates whether we should set the link register to point
> +	 to the next instruction or not.  */

Formatting as well on the start of the second line.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]