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]

[commit/obvious] Fix PR sim/16018


Hi,

I have committed the following patch as an obvious fix for PR
sim/16018.  It just adds missing "break" statements in a switch.

I must confess that I did not manage to build ERC32 sim.  What I did
was:

  ../gdb-src/configure --target=sparc-rtems4.11 --enable-sim --enable-sim-hardware

And I received the following error:

  In file included from ../../../../../gdb-src/sim/erc32/../../include/gdb/callback.h:55:0,
                   from ../../../../../gdb-src/sim/erc32/sis.h:24,
                   from ../../../../../gdb-src/sim/erc32/exec.c:23:
  ../../bfd/bfd.h:1070:48: error: unknown type name âsize_tâ

Strange...  I did not investigate too much, but maybe I'm doing
something wrong.

Anyway, patch applied.

        https://sourceware.org/ml/gdb-cvs/2013-10/msg00064.html

-- 
Sergio

2013-10-09  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR sim/16018:
	* float.c (set_fsr): Add missing "break" statements.  Reindent
	code.

diff --git a/sim/erc32/float.c b/sim/erc32/float.c
index c1a46f8..1b8f0fc 100644
--- a/sim/erc32/float.c
+++ b/sim/erc32/float.c
@@ -91,9 +91,16 @@ uint32 fsr;
      fsr >>= 30;
      switch (fsr) {
 	case 0: 
-	case 2: break;
-	case 1: fsr = 3;
-	case 3: fsr = 1;
+	case 2:
+	  break;
+
+	case 1:
+	  fsr = 3;
+	  break;
+
+	case 3:
+	  fsr = 1;
+	  break;
      }
      rawfsr = _get_cw();
      rawfsr |= (fsr << 10) | 0x3ff;


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