public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: mips32_scan_prologue's indentation
@ 2011-12-08 22:03 Maciej W. Rozycki
  2011-12-09  9:15 ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2011-12-08 22:03 UTC (permalink / raw)
  To: gdb-patches

Hi,

 While looking through some recent changes I've noticed there's a leading 
space missing in one place in mips32_scan_prologue and upon a closer 
inspection I realised a whole block of code is incorrectly indented, as if 
a unified diff was pasted with a mouse from a screen dump and the leading 
"+" character overlying a tab deleted causing a missing leading space 
where tabs were used (these have not been restored either, even in places 
where eight consecutive spaces remained).

 I have therefore reindented the whole affected block as below and would 
apply that as obvious, but as this changes quite a chunk of code I'll wait 
a day or two for any comments just in case this would cause inconvenience 
to anyone.  I'll apply it then unless I hear any objections.

2011-12-08  Maciej W. Rozycki <macro@codesourcery.com>

	gdb/
	* mips-tdep.c (mips32_scan_prologue): Correct indentation.

  Maciej

gdb-mips32-scan-prologue-format.diff
Index: gdb-fsf-trunk-quilt/gdb/mips-tdep.c
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/mips-tdep.c	2011-12-07 21:23:54.000000000 +0000
+++ gdb-fsf-trunk-quilt/gdb/mips-tdep.c	2011-12-07 22:12:36.465633944 +0000
@@ -2271,43 +2271,43 @@ mips32_scan_prologue (struct gdbarch *gd
                || inst == 0x0399e021 /* addu $gp,$gp,$t9 */
                || inst == 0x033ce021 /* addu $gp,$t9,$gp */
               )
-       {
-         /* These instructions are part of the prologue, but we don't
-            need to do anything special to handle them.  */
-       }
+	{
+	  /* These instructions are part of the prologue, but we don't
+	     need to do anything special to handle them.  */
+	}
       /* The instructions below load $at or $t0 with an immediate
          value in preparation for a stack adjustment via
          subu $sp,$sp,[$at,$t0].  These instructions could also
          initialize a local variable, so we accept them only before
          a stack adjustment instruction was seen.  */
       else if (!seen_sp_adjust
-               && (high_word == 0x3c01 /* lui $at,n */
-                   || high_word == 0x3c08 /* lui $t0,n */
-                   || high_word == 0x3421 /* ori $at,$at,n */
-                   || high_word == 0x3508 /* ori $t0,$t0,n */
-                   || high_word == 0x3401 /* ori $at,$zero,n */
-                   || high_word == 0x3408 /* ori $t0,$zero,n */
-                  ))
-       {
-	 if (end_prologue_addr == 0)
-	   load_immediate_bytes += MIPS_INSN32_SIZE;		/* FIXME!  */
-       }
+	       && (high_word == 0x3c01 /* lui $at,n */
+		   || high_word == 0x3c08 /* lui $t0,n */
+		   || high_word == 0x3421 /* ori $at,$at,n */
+		   || high_word == 0x3508 /* ori $t0,$t0,n */
+		   || high_word == 0x3401 /* ori $at,$zero,n */
+		   || high_word == 0x3408 /* ori $t0,$zero,n */
+		  ))
+	{
+	  if (end_prologue_addr == 0)
+	    load_immediate_bytes += MIPS_INSN32_SIZE;		/* FIXME!  */
+	}
       else
-       {
-         /* This instruction is not an instruction typically found
-            in a prologue, so we must have reached the end of the
-            prologue.  */
-         /* FIXME: brobecker/2004-10-10: Can't we just break out of this
-            loop now?  Why would we need to continue scanning the function
-            instructions?  */
-         if (end_prologue_addr == 0)
-           end_prologue_addr = cur_pc;
-
-	 /* Check for branches and jumps.  For now, only jump to
-	    register are caught (i.e. returns).  */
-	 if ((itype_op (inst) & 0x07) == 0 && rtype_funct (inst) == 8)
-	   in_delay_slot = 1;
-       }
+	{
+	  /* This instruction is not an instruction typically found
+	     in a prologue, so we must have reached the end of the
+	     prologue.  */
+	  /* FIXME: brobecker/2004-10-10: Can't we just break out of this
+	     loop now?  Why would we need to continue scanning the function
+	     instructions?  */
+	  if (end_prologue_addr == 0)
+	    end_prologue_addr = cur_pc;
+
+	  /* Check for branches and jumps.  For now, only jump to
+	     register are caught (i.e. returns).  */
+	  if ((itype_op (inst) & 0x07) == 0 && rtype_funct (inst) == 8)
+	    in_delay_slot = 1;
+	}
 
       /* If the previous instruction was a jump, we must have reached
 	 the end of the prologue by now.  Stop scanning so that we do

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: mips32_scan_prologue's indentation
  2011-12-08 22:03 [PATCH] MIPS: mips32_scan_prologue's indentation Maciej W. Rozycki
@ 2011-12-09  9:15 ` Joel Brobecker
  2012-03-01 23:38   ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2011-12-09  9:15 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: gdb-patches

>  I have therefore reindented the whole affected block as below and would 
> apply that as obvious, but as this changes quite a chunk of code I'll wait 
> a day or two for any comments just in case this would cause inconvenience 
> to anyone.  I'll apply it then unless I hear any objections.
> 
> 2011-12-08  Maciej W. Rozycki <macro@codesourcery.com>
> 
> 	gdb/
> 	* mips-tdep.c (mips32_scan_prologue): Correct indentation.

Indentation changes, no matter how big, are indeed obvious. So no need
to wait.

Thanks!
-- 
Joel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: mips32_scan_prologue's indentation
  2011-12-09  9:15 ` Joel Brobecker
@ 2012-03-01 23:38   ` Maciej W. Rozycki
  0 siblings, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2012-03-01 23:38 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On Fri, 9 Dec 2011, Joel Brobecker wrote:

> >  I have therefore reindented the whole affected block as below and would 
> > apply that as obvious, but as this changes quite a chunk of code I'll wait 
> > a day or two for any comments just in case this would cause inconvenience 
> > to anyone.  I'll apply it then unless I hear any objections.
> > 
> > 2011-12-08  Maciej W. Rozycki <macro@codesourcery.com>
> > 
> > 	gdb/
> > 	* mips-tdep.c (mips32_scan_prologue): Correct indentation.
> 
> Indentation changes, no matter how big, are indeed obvious. So no need
> to wait.

 This has nevertheless fallen in the cracks. :(  I have retrieved it back 
now and applied.

  Maciej

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-01 23:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-08 22:03 [PATCH] MIPS: mips32_scan_prologue's indentation Maciej W. Rozycki
2011-12-09  9:15 ` Joel Brobecker
2012-03-01 23:38   ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).