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: New ARI warning Thu May 16 01:51:20 UTC 2013 in -D 2013-05-16-gmt


> I'd just un-indent it.  It's small, and fits one page -- I don't
> think it'll confuse anyone.  Besides, if I wanted to re-run the program,
> I know I would feel an irresistible urge to un-indent it once I had
> pasted it into a new file.  :-)

True :). In the end, simple is best...

Attached is what I checked in.

gdb/ChangeLog:

        * rs6000-aix-tdep.c: De-indent some example code provided
        as a comment.

Thanks :)
-- 
Joel
>From 2a39e2541bea01c8c49eaea22f70f3413e5eb837 Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Mon, 20 May 2013 13:07:12 +0400
Subject: [PATCH] De-indent example code in rs6000-aix-tdep.c (ARI fix)

This patch de-indents the code provided as a comment explaining
how the code declaring the ld_info32_desc and ld_info64_desc globals
was generated. The intent is to avoid an ARI warning about a macro
not starting at column zero of the line.

gdb/ChangeLog:

        * rs6000-aix-tdep.c: De-indent some example code provided
        as a comment.
---
 gdb/ChangeLog         |    5 +++
 gdb/rs6000-aix-tdep.c |   88 ++++++++++++++++++++++++-------------------------
 2 files changed, 49 insertions(+), 44 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d10eb65..e536b15 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-20  Joel Brobecker  <brobecker@adacore.com>
+
+	* rs6000-aix-tdep.c: De-indent some example code provided
+	as a comment.
+
 2013-05-17  Edjunior Machado  <emachado@linux.vnet.ibm.com>
 
 	* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Check if the
diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c
index 9956eb3..62bc6ee 100644
--- a/gdb/rs6000-aix-tdep.c
+++ b/gdb/rs6000-aix-tdep.c
@@ -777,50 +777,50 @@ struct ld_info_desc
    the following program on AIX 5.3.  */
 
 #if 0
-    #include <stddef.h>
-    #include <stdio.h>
-    #define __LDINFO_PTRACE32__
-    #define __LDINFO_PTRACE64__
-    #include <sys/ldr.h>
-
-    #define pinfo(type,member)              \
-      {                                         \
-        struct type ldi = {0};                  \
-                                                \
-        printf ("  {%d, %d},\t/* %s */\n",      \
-                offsetof (struct type, member), \
-                sizeof (ldi.member),            \
-                #member);                       \
-      }                                         \
-      while (0)
-
-    int
-    main (void)
-    {
-      printf ("static const struct ld_info_desc ld_info32_desc =\n{\n");
-      pinfo (__ld_info32, ldinfo_next);
-      pinfo (__ld_info32, ldinfo_fd);
-      pinfo (__ld_info32, ldinfo_textorg);
-      pinfo (__ld_info32, ldinfo_textsize);
-      pinfo (__ld_info32, ldinfo_dataorg);
-      pinfo (__ld_info32, ldinfo_datasize);
-      pinfo (__ld_info32, ldinfo_filename);
-      printf ("};\n");
-
-      printf ("\n");
-
-      printf ("static const struct ld_info_desc ld_info64_desc =\n{\n");
-      pinfo (__ld_info64, ldinfo_next);
-      pinfo (__ld_info64, ldinfo_fd);
-      pinfo (__ld_info64, ldinfo_textorg);
-      pinfo (__ld_info64, ldinfo_textsize);
-      pinfo (__ld_info64, ldinfo_dataorg);
-      pinfo (__ld_info64, ldinfo_datasize);
-      pinfo (__ld_info64, ldinfo_filename);
-      printf ("};\n");
-
-      return 0;
-    }
+#include <stddef.h>
+#include <stdio.h>
+#define __LDINFO_PTRACE32__
+#define __LDINFO_PTRACE64__
+#include <sys/ldr.h>
+
+#define pinfo(type,member)                  \
+  {                                         \
+    struct type ldi = {0};                  \
+                                            \
+    printf ("  {%d, %d},\t/* %s */\n",      \
+            offsetof (struct type, member), \
+            sizeof (ldi.member),            \
+            #member);                       \
+  }                                         \
+  while (0)
+
+int
+main (void)
+{
+  printf ("static const struct ld_info_desc ld_info32_desc =\n{\n");
+  pinfo (__ld_info32, ldinfo_next);
+  pinfo (__ld_info32, ldinfo_fd);
+  pinfo (__ld_info32, ldinfo_textorg);
+  pinfo (__ld_info32, ldinfo_textsize);
+  pinfo (__ld_info32, ldinfo_dataorg);
+  pinfo (__ld_info32, ldinfo_datasize);
+  pinfo (__ld_info32, ldinfo_filename);
+  printf ("};\n");
+
+  printf ("\n");
+
+  printf ("static const struct ld_info_desc ld_info64_desc =\n{\n");
+  pinfo (__ld_info64, ldinfo_next);
+  pinfo (__ld_info64, ldinfo_fd);
+  pinfo (__ld_info64, ldinfo_textorg);
+  pinfo (__ld_info64, ldinfo_textsize);
+  pinfo (__ld_info64, ldinfo_dataorg);
+  pinfo (__ld_info64, ldinfo_datasize);
+  pinfo (__ld_info64, ldinfo_filename);
+  printf ("};\n");
+
+  return 0;
+}
 #endif /* 0 */
 
 /* Layout of the 32bit version of struct ld_info.  */
-- 
1.7.10.4


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