From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gITONoWgBWL8QQAAWB0awg (envelope-from ) for ; Thu, 10 Feb 2022 18:32:21 -0500 Received: by simark.ca (Postfix, from userid 112) id DEB571F3C6; Thu, 10 Feb 2022 18:32:21 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RDNS_DYNAMIC autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3471E1ECEB for ; Thu, 10 Feb 2022 18:32:21 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D783E3858435 for ; Thu, 10 Feb 2022 23:32:20 +0000 (GMT) Received: from outbound-ss-820.bluehost.com (outbound-ss-820.bluehost.com [69.89.24.241]) by sourceware.org (Postfix) with ESMTPS id DA1E13858C20 for ; Thu, 10 Feb 2022 23:31:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DA1E13858C20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw11.mail.unifiedlayer.com (unknown [10.0.90.126]) by progateway2.mail.pro1.eigbox.com (Postfix) with ESMTP id 4543410047F8F for ; Thu, 10 Feb 2022 23:31:55 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id IIuoncm4pwm8iIIupndGKl; Thu, 10 Feb 2022 23:31:55 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=DpSTREz+ c=1 sm=1 tr=0 ts=6205a06b a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=oGFeUVbbRNcA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=oGMGq998wklWVoRMzLYA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/RdNO39/2xcEwD+JfQ5eY7IdcQkgQ0D/GgIuncMlxOE=; b=Y8AcMDs59LlUtXmzTDItSQA44k tOHyZiHBPcWUlx5AnYcHDBx5cntz2NHp+n1rr2e9SKOnhmkhexP2vVudWHc+9Ot1QLX6d62OOWWqO 6Q6XjO1XVJnz9WG+6Egv0+pBG; Received: from c-73-181-19-44.hsd1.co.comcast.net ([73.181.19.44]:37350 helo=prentzel..) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nIIuo-001dcp-GQ; Thu, 10 Feb 2022 16:31:54 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 2/3] Remove LA_PRINT_CHAR Date: Thu, 10 Feb 2022 16:31:51 -0700 Message-Id: <20220210233152.2181913-3-tom@tromey.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220210233152.2181913-1-tom@tromey.com> References: <20220210233152.2181913-1-tom@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 73.181.19.44 X-Source-L: No X-Exim-ID: 1nIIuo-001dcp-GQ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: c-73-181-19-44.hsd1.co.comcast.net (prentzel..) [73.181.19.44]:37350 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes 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: , Cc: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" This removes the LA_PRINT_CHAR macro, in favor of using ordinary method calls. --- gdb/ada-valprint.c | 2 +- gdb/c-valprint.c | 3 ++- gdb/language.h | 2 -- gdb/typeprint.c | 2 +- gdb/valprint.c | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index adab6b42f5b..a59c392bef4 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -402,7 +402,7 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream) break; case TYPE_CODE_CHAR: - LA_PRINT_CHAR (val, type, stream); + current_language->printchar (val, type, stream); break; case TYPE_CODE_BOOL: diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index fadbc5b7022..047e5687b0a 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -409,7 +409,8 @@ c_value_print_int (struct value *val, struct ui_file *stream, if (c_textual_element_type (type, options->format)) { fputs_filtered (" ", stream); - LA_PRINT_CHAR (unpack_long (type, valaddr), type, stream); + current_language->printchar (unpack_long (type, valaddr), type, + stream); } } } diff --git a/gdb/language.h b/gdb/language.h index 3930f5bd223..4eb414bbe12 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -755,8 +755,6 @@ extern enum language set_language (enum language); the current setting of working_lang, which the user sets with the "set language" command. */ -#define LA_PRINT_CHAR(ch, type, stream) \ - (current_language->printchar (ch, type, stream)) #define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses, options) \ (current_language->printstr (stream, elttype, string, length, \ encoding, force_ellipses,options)) diff --git a/gdb/typeprint.c b/gdb/typeprint.c index c15a9c6b59f..8cb34ad1921 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -647,7 +647,7 @@ print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream) break; case TYPE_CODE_CHAR: - LA_PRINT_CHAR ((unsigned char) val, type, stream); + current_language->printchar ((unsigned char) val, type, stream); break; case TYPE_CODE_BOOL: diff --git a/gdb/valprint.c b/gdb/valprint.c index 25e4a8dc8e1..07bc324be5d 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -791,7 +791,7 @@ generic_value_print_char (struct value *value, struct ui_file *stream, else fprintf_filtered (stream, "%d", (int) val); fputs_filtered (" ", stream); - LA_PRINT_CHAR (val, unresolved_type, stream); + current_language->printchar (val, unresolved_type, stream); } } -- 2.31.1