public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 01/10] [gdb/ada] Fix argument name misspelling
Date: Fri,  2 Jun 2023 17:56:30 +0200	[thread overview]
Message-ID: <20230602155639.28245-2-tdevries@suse.de> (raw)
In-Reply-To: <20230602155639.28245-1-tdevries@suse.de>

Two functions use the argument name bounds_prefered_p.

This misspells "preferred".

Fix this by using bounds_preferred_p instead.

Tested on x86_64-linux.
---
 gdb/ada-typeprint.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c
index 3866b2d35eb..98faf315460 100644
--- a/gdb/ada-typeprint.c
+++ b/gdb/ada-typeprint.c
@@ -122,14 +122,14 @@ type_is_full_subrange_of_target_type (struct type *type)
   return 1;
 }
 
-/* Print TYPE on STREAM, preferably as a range if BOUNDS_PREFERED_P
+/* Print TYPE on STREAM, preferably as a range if BOUNDS_PREFERRED_P
    is nonzero.  */
 
 static void
 print_range (struct type *type, struct ui_file *stream,
-	     int bounds_prefered_p)
+	     int bounds_preferred_p)
 {
-  if (!bounds_prefered_p)
+  if (!bounds_preferred_p)
     {
       /* Try stripping all TYPE_CODE_RANGE layers whose bounds
 	 are identical to the bounds of their subtype.  When
@@ -253,14 +253,14 @@ print_dynamic_range_bound (struct type *type, const char *name, int name_len,
 /* Print RAW_TYPE as a range type, using any bound information
    following the GNAT encoding (if available).
 
-   If BOUNDS_PREFERED_P is nonzero, force the printing of the range
+   If BOUNDS_PREFERRED_P is nonzero, force the printing of the range
    using its bounds.  Otherwise, try printing the range without
    printing the value of the bounds, if possible (this is only
    considered a hint, not a guaranty).  */
 
 static void
 print_range_type (struct type *raw_type, struct ui_file *stream,
-		  int bounds_prefered_p)
+		  int bounds_preferred_p)
 {
   const char *name;
   struct type *base_type;
@@ -277,7 +277,7 @@ print_range_type (struct type *raw_type, struct ui_file *stream,
 
   subtype_info = strstr (name, "___XD");
   if (subtype_info == NULL)
-    print_range (raw_type, stream, bounds_prefered_p);
+    print_range (raw_type, stream, bounds_preferred_p);
   else
     {
       int prefix_len = subtype_info - name;
@@ -382,7 +382,7 @@ print_array_type (struct type *type, struct ui_file *stream, int show,
 	      if (arr_type != type)
 		gdb_printf (stream, ", ");
 	      print_range (arr_type->index_type (), stream,
-			   0 /* bounds_prefered_p */);
+			   0 /* bounds_preferred_p */);
 	      if (TYPE_FIELD_BITSIZE (arr_type, 0) > 0)
 		bitsize = TYPE_FIELD_BITSIZE (arr_type, 0);
 	      /* A multi-dimensional array is represented using a
@@ -407,7 +407,7 @@ print_array_type (struct type *type, struct ui_file *stream, int show,
 	      if (k > 0)
 		gdb_printf (stream, ", ");
 	      print_range_type (range_desc_type->field (k).type (),
-				stream, 0 /* bounds_prefered_p */);
+				stream, 0 /* bounds_preferred_p */);
 	      if (TYPE_FIELD_BITSIZE (arr_type, 0) > 0)
 		bitsize = TYPE_FIELD_BITSIZE (arr_type, 0);
 	    }
@@ -1031,7 +1031,7 @@ ada_print_type (struct type *type0, const char *varstring,
 	  else
 	    {
 	      gdb_printf (stream, "range ");
-	      print_range_type (type, stream, 1 /* bounds_prefered_p */);
+	      print_range_type (type, stream, 1 /* bounds_preferred_p */);
 	    }
 	}
 	break;
@@ -1048,7 +1048,7 @@ ada_print_type (struct type *type0, const char *varstring,
 	else
 	  {
 	    gdb_printf (stream, "range ");
-	    print_range (type, stream, 1 /* bounds_prefered_p */);
+	    print_range (type, stream, 1 /* bounds_preferred_p */);
 	  }
 	break;
       case TYPE_CODE_FLT:
-- 
2.35.3


  reply	other threads:[~2023-06-02 15:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02 15:56 [PATCH 00/10] [gdb] Fix typos and misspellings Tom de Vries
2023-06-02 15:56 ` Tom de Vries [this message]
2023-06-02 15:56 ` [PATCH 02/10] [gdbserver] Fix typo in debug message Tom de Vries
2023-06-02 15:56 ` [PATCH 03/10] [gdb/compile] " Tom de Vries
2023-06-02 15:56 ` [PATCH 04/10] [gdb/cli] Fix help text of maint set ignore-prologue-end-flag Tom de Vries
2023-06-02 15:56 ` [PATCH 05/10] [gdb/cli] Fix help text of maint info target-sections Tom de Vries
2023-06-02 15:56 ` [PATCH 06/10] [gdb/tui] Fix help text of show tui tab-width Tom de Vries
2023-06-02 15:56 ` [PATCH 07/10] [gdb/guile] Fix doc string for value-optimized-out? Tom de Vries
2023-06-02 15:56 ` [PATCH 08/10] [gdb/python] Fix doc string of valpy_const_value Tom de Vries
2023-06-02 15:56 ` [PATCH 09/10] [gdb/tdep] Fix typo in debug message Tom de Vries
2023-06-02 15:56 ` [PATCH 10/10] [gdb] Fix typos Tom de Vries
2023-06-02 17:04 ` [PATCH 00/10] [gdb] Fix typos and misspellings Tom Tromey
2023-06-03 10:19   ` Tom de Vries
2023-06-03 15:28     ` Tom Tromey
2023-06-05  7:20       ` Bruno Larsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230602155639.28245-2-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).