From patchwork Fri Jun 2 15:56:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 70541 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4E1623857714 for ; Fri, 2 Jun 2023 15:56:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E1623857714 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1685721417; bh=S4vqFIDdH8B0yjywcWd74wnrh98O55cTk8IfkvTech4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=axlLuYyzza5bk1i4TdzQZ9VbohwDLFppgTQMw+zcfB0i/e+VhuBa+i5LmzEhcWuuY oOCkS+eeOXznwJgSeaBosCNHjlauMYcvlcgnsPEo01UOwTE1WfUo8otY9mcCK59iJB nZTQhSZkVXIv6SLrXy7kUddDx1fsowdNXxcfPfaA= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 35E123858C66 for ; Fri, 2 Jun 2023 15:56:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 35E123858C66 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 65F5421A4A for ; Fri, 2 Jun 2023 15:56:33 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5175C133E6 for ; Fri, 2 Jun 2023 15:56:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4D61EjERemQ6ewAAMHmgww (envelope-from ) for ; Fri, 02 Jun 2023 15:56:33 +0000 To: gdb-patches@sourceware.org Subject: [PATCH 01/10] [gdb/ada] Fix argument name misspelling Date: Fri, 2 Jun 2023 17:56:30 +0200 Message-Id: <20230602155639.28245-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230602155639.28245-1-tdevries@suse.de> References: <20230602155639.28245-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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: