]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
testsuite: minor housekeeping
authorIndu Bhagat <indu.bhagat@oracle.com>
Thu, 25 Apr 2024 16:37:28 +0000 (09:37 -0700)
committerIndu Bhagat <indu.bhagat@oracle.com>
Sun, 23 Mar 2025 19:04:06 +0000 (12:04 -0700)
Fix some code formatting nits.

libsframe/testsuite/

        * libsframe.stacktrace/libsframest/sframe-stacktrace-err.c:
        * libsframe.stacktrace/libsframest/sframe-stacktrace.c:
        * libsframe.stacktrace/libsframest/sframe-state.c:
        * libsframe.stacktrace/libsframest/sframe-state.h:
        * libsframe.stacktrace/stacktrace-inline-2.c:

libsframe/testsuite/libsframe.stacktrace/libsframest/sframe-stacktrace-err.c
libsframe/testsuite/libsframe.stacktrace/libsframest/sframe-stacktrace.c
libsframe/testsuite/libsframe.stacktrace/libsframest/sframe-state.c
libsframe/testsuite/libsframe.stacktrace/libsframest/sframe-state.h
libsframe/testsuite/libsframe.stacktrace/stacktrace-inline-2.c

index 4f64b4d8afd6019b166e45ea570a2bc96bbc7d52..275ca33e6bc6a5c55be5566f61300634a617f64c 100644 (file)
@@ -49,7 +49,7 @@ sframe_bt_errmsg (enum sframe_bt_errcode ecode)
   return sframe_bt_errlist[ecode];
 }
 
-/* sframe_bt_errno - Check if there is error code in ERRP.  */
+/* Check if there is error code in ERRP.  */
 
 int
 sframe_bt_errno (const int *errp)
@@ -68,4 +68,3 @@ sframe_bt_ret_set_errno (int *errp, int error)
 
   return error;
 }
-
index 521c86f247d3e41fea5dab6328f489aedc4b2a79..fbd001bc8f853a212d0e826f235521bac32439ac 100644 (file)
@@ -123,8 +123,8 @@ sframe_unwind (struct sframe_state *sf, void **ra_lst,
          if (errnum == SFRAME_ERR_FREOFFSET_NOPRESENT)
            return sframe_bt_ret_set_errno (&err, SFRAME_BT_ERR_CFA_OFFSET);
 
-         cfa = ((frep->fre_info & 0x1) == SFRAME_BASE_REG_SP
-           ? rsp : rfp) + cfa_offset;
+         cfa = (((frep->fre_info & 0x1) == SFRAME_BASE_REG_SP)
+                ? rsp : rfp) + cfa_offset;
 
 #ifdef __x86_64__
          /* For x86, read the return address from the fixed RA offset from
index bb78c1a5b2fda686db36fc3b8b4d960775e59cdc..1d0ae08369e16c15579b63083d32fb0a97b62080 100644 (file)
@@ -80,7 +80,7 @@ sframe_bt_set_errno (int *errp, int error)
 
 #endif
 
-/* sframe_add_dso - Add .sframe info in D_DATA, which is associated with
+/* Add .sframe info in D_DATA, which is associated with
    a dynamic shared object, to D_LIST.  */
 
 static int
@@ -118,7 +118,7 @@ sframe_add_dso (struct sframe_stinfo_list *d_list,
   return SFRAME_BT_OK;
 }
 
-/* sframe_free_cfi - Free up space allocated for .sframe info for CF.  */
+/* Free up space allocated for .sframe info for CF.  */
 
 void
 sframe_free_cfi (struct sframe_state *sf)
@@ -146,7 +146,7 @@ sframe_free_cfi (struct sframe_state *sf)
   free (d_list->entry);
 }
 
-/* sframe_find_context - Find the decode data that contains ADDR from CF.
+/* Find the decode data that contains ADDR from CF.
    Return the pointer to the decode data or NULL.  */
 
 struct sframe_stinfo *
@@ -175,9 +175,9 @@ sframe_find_context (struct sframe_state *sf, uint64_t addr)
   return NULL;
 }
 
-/* sframe_load_ctx - Call decoder to create and set up the SFrame info for
-   either the main module or one of the DSOs from CF, based on the input
-   RADDR argument.  Return the newly created decode context or NULL.  */
+/* Call decoder to create and set up the SFrame info for either the main module
+   or one of the DSOs from CF, based on the input RADDR argument.  Return the
+   newly created decode context or NULL.  */
 
 sframe_decoder_ctx *
 sframe_load_ctx (struct sframe_state *sf, uint64_t raddr)
@@ -205,10 +205,10 @@ sframe_load_ctx (struct sframe_state *sf, uint64_t raddr)
   return NULL;
 }
 
-/* sframe_update_ctx - Check if need to do a decode context switch, based on
-   the input RADDR argument, from CF. A new decode context will be created
-   and set up if it isn't already done so. Return the new decode context in
-   CTX and vma in CFI_VMA.  */
+/* Check if need to do a decode context switch, based on the input RADDR
+   argument, from CF. A new decode context will be created and set up if it
+   isn't already done so. Return the new decode context in CTX and vma in
+   CFI_VMA.  */
 
 void
 sframe_update_ctx (struct sframe_state *sf, uint64_t raddr,
@@ -236,8 +236,8 @@ sframe_update_ctx (struct sframe_state *sf, uint64_t raddr,
     }
 }
 
-/* sframe_fd_open - Open /proc image associated with the process id and return
-   the file descriptor.  */
+/* Open /proc image associated with the process id and return the file
+   descriptor.  */
 
 static int
 sframe_fd_open (int *errp)
index 97954110d2a6152efc01d68e99804fa175d79803..98c91f68c2646877889e32c5ded0ccbfd6c45334 100644 (file)
@@ -38,8 +38,9 @@
 #include "sframe-stacktrace-api.h"
 #include "sframe-stacktrace-regs.h"
 
+/* glibc's elf.h will bring this in future.  */
 #ifndef PT_SFRAME
-#define PT_SFRAME 0x6474e554           /* FIXME.  */
+#define PT_SFRAME 0x6474e554
 #endif
 
 /* SFrame decode data for the main module or a DSO.  */
@@ -58,15 +59,15 @@ struct sframe_stinfo_list
 {
   int alloced;                         /* Entries allocated.  */
   int used;                            /* Entries used.  */
-  struct sframe_stinfo *entry; /* DSO's decode data.  */
+  struct sframe_stinfo *entry;         /* DSO's decode data.  */
 };
 
 /* Data that's passed through sframe_callback.  */
 struct sframe_state
 {
   int sui_fd;                          /* File descriptor.  */
-  struct sframe_stinfo sui_ctx;        /* The decode data.  */
-  struct sframe_stinfo_list sui_dsos;          /* The DSO list.  */
+  struct sframe_stinfo sui_ctx;                /* The decode data.  */
+  struct sframe_stinfo_list sui_dsos;  /* The DSO list.  */
 };
 
 
@@ -81,8 +82,8 @@ void sframe_update_ctx (struct sframe_state *sf, uint64_t raddr,
 
 sframe_decoder_ctx *sframe_load_ctx (struct sframe_state *sf, uint64_t raddr);
 
-struct sframe_stinfo *
-sframe_find_context (struct sframe_state *sf, uint64_t addr);
+struct sframe_stinfo *sframe_find_context (struct sframe_state *sf,
+                                          uint64_t addr);
 
 void sframe_free_cfi (struct sframe_state *sf);
 
index 3b0ee912dae394e7d6f1ad363c8df52ab5b67dc3..28d2ae0408a613ab4de3e357ab862a386d5d76a8 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This is a revised version of gdb/testsuite/gdb.opt/inline-cmds.c.  */
+
 /* This is only ever run if it is compiled with a new-enough GCC, but
    we don't want the compilation to fail if compiled by some other
    compiler.  */
-
-/* This is a revised version of gdb/testsuite/gdb.opt/inline-cmds.c.  */
-
 #ifdef __GNUC__
 #define ATTR __attribute__((always_inline))
 #else