Style fixes.
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 27 Feb 2015 18:17:43 +0000 (13:17 -0500)
committerJohn Baldwin <jhb@FreeBSD.org>
Fri, 13 Mar 2015 18:01:38 +0000 (14:01 -0400)
- Do not leave operators at end-of-line.
- Fix block indentation in if-else chain.

gdb/ChangeLog:

* amd64fbsd-tdep.c (amd64fbsd_sigtramp_p): Style fixes.
* i386fbsd-tdep.c: Fix style in various gdb_static_assert
expressions.
(i386fbsd_sigtramp_p): Likewise.

gdb/ChangeLog
gdb/amd64fbsd-tdep.c
gdb/i386fbsd-tdep.c

index 122ac570ccd06190a161b133e9058a5fd953200e..ed21f3f923df76222b4045710d41c9910e683021 100644 (file)
@@ -1,3 +1,10 @@
+2015-03-13  John Baldwin  <jhb@FreeBSD.org>
+
+       * amd64fbsd-tdep.c (amd64fbsd_sigtramp_p): Style fixes.
+       * i386fbsd-tdep.c: Fix style in various gdb_static_assert
+       expressions.
+       (i386fbsd_sigtramp_p): Likewise.
+
 2015-03-12  John Baldwin  <jhb@FreeBSD.org>
 
        * MAINTAINERS (Write After Approval): Add John Baldwin.
index e11b0f371ecab9b3ea32262b3c07a14aafd8ab4c..62dcb83d6d0b4b3bfb6c9a674a6f866670b51e97 100644 (file)
@@ -51,8 +51,8 @@ amd64fbsd_sigtramp_p (struct frame_info *this_frame)
 
   if (!safe_frame_unwind_memory (this_frame, pc, buf, sizeof buf))
     return 0;
-  if (memcmp (buf, amd64fbsd_sigtramp_code, sizeof amd64fbsd_sigtramp_code) !=
-      0)
+  if (memcmp (buf, amd64fbsd_sigtramp_code, sizeof amd64fbsd_sigtramp_code)
+      != 0)
     return 0;
 
   return 1;
index d4516ee137b8709fced0ba5b16431255213f31f9..ed417063643e26d2c375697910efc9a77ae30831 100644 (file)
@@ -105,24 +105,24 @@ static const gdb_byte i386fbsd_osigtramp_end[] =
 };
 
 /* The three different trampolines are all the same size.  */
-gdb_static_assert (sizeof i386fbsd_sigtramp_start ==
-                  sizeof i386fbsd_freebsd4_sigtramp_start);
-gdb_static_assert (sizeof i386fbsd_sigtramp_start ==
-                  sizeof i386fbsd_osigtramp_start);
-gdb_static_assert (sizeof i386fbsd_sigtramp_middle ==
-                  sizeof i386fbsd_freebsd4_sigtramp_middle);
-gdb_static_assert (sizeof i386fbsd_sigtramp_middle ==
-                  sizeof i386fbsd_osigtramp_middle);
-gdb_static_assert (sizeof i386fbsd_sigtramp_end ==
-                  sizeof i386fbsd_freebsd4_sigtramp_end);
-gdb_static_assert (sizeof i386fbsd_sigtramp_end ==
-                  sizeof i386fbsd_osigtramp_end);
+gdb_static_assert (sizeof i386fbsd_sigtramp_start
+                  == sizeof i386fbsd_freebsd4_sigtramp_start);
+gdb_static_assert (sizeof i386fbsd_sigtramp_start
+                  == sizeof i386fbsd_osigtramp_start);
+gdb_static_assert (sizeof i386fbsd_sigtramp_middle
+                  == sizeof i386fbsd_freebsd4_sigtramp_middle);
+gdb_static_assert (sizeof i386fbsd_sigtramp_middle
+                  == sizeof i386fbsd_osigtramp_middle);
+gdb_static_assert (sizeof i386fbsd_sigtramp_end
+                  == sizeof i386fbsd_freebsd4_sigtramp_end);
+gdb_static_assert (sizeof i386fbsd_sigtramp_end
+                  == sizeof i386fbsd_osigtramp_end);
 
 /* We assume that the middle is the largest chunk below.  */
-gdb_static_assert (sizeof i386fbsd_sigtramp_middle >
-                  sizeof i386fbsd_sigtramp_start);
-gdb_static_assert (sizeof i386fbsd_sigtramp_middle >
-                  sizeof i386fbsd_sigtramp_end);
+gdb_static_assert (sizeof i386fbsd_sigtramp_middle
+                  sizeof i386fbsd_sigtramp_start);
+gdb_static_assert (sizeof i386fbsd_sigtramp_middle
+                  sizeof i386fbsd_sigtramp_end);
 
 static int
 i386fbsd_sigtramp_p (struct frame_info *this_frame)
@@ -135,19 +135,25 @@ i386fbsd_sigtramp_p (struct frame_info *this_frame)
   if (!safe_frame_unwind_memory (this_frame, pc, buf,
                                 sizeof i386fbsd_sigtramp_start))
     return 0;
-  if (memcmp (buf, i386fbsd_sigtramp_start, sizeof i386fbsd_sigtramp_start) ==
-      0) {
-    middle = i386fbsd_sigtramp_middle;
-    end = i386fbsd_sigtramp_end;
-  } else if (memcmp (buf, i386fbsd_freebsd4_sigtramp_start,
-                    sizeof i386fbsd_freebsd4_sigtramp_start) == 0) {
-    middle = i386fbsd_freebsd4_sigtramp_middle;
-    end = i386fbsd_freebsd4_sigtramp_end;
-  } else if (memcmp (buf, i386fbsd_osigtramp_start,
-                    sizeof i386fbsd_osigtramp_start) == 0) {
-    middle = i386fbsd_osigtramp_middle;
-    end = i386fbsd_osigtramp_end;
-  } else
+  if (memcmp (buf, i386fbsd_sigtramp_start, sizeof i386fbsd_sigtramp_start)
+      == 0)
+    {
+      middle = i386fbsd_sigtramp_middle;
+      end = i386fbsd_sigtramp_end;
+    }
+  else if (memcmp (buf, i386fbsd_freebsd4_sigtramp_start,
+                  sizeof i386fbsd_freebsd4_sigtramp_start) == 0)
+    {
+      middle = i386fbsd_freebsd4_sigtramp_middle;
+      end = i386fbsd_freebsd4_sigtramp_end;
+    }
+  else if (memcmp (buf, i386fbsd_osigtramp_start,
+                  sizeof i386fbsd_osigtramp_start) == 0)
+    {
+      middle = i386fbsd_osigtramp_middle;
+      end = i386fbsd_osigtramp_end;
+    }
+  else
     return 0;
 
   /* Since the end is shorter than the middle, check for a matching end