From patchwork Sun Dec 8 18:29:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 36589 Received: (qmail 101367 invoked by alias); 8 Dec 2019 18:30:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 101214 invoked by uid 89); 8 Dec 2019 18:30:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=4112 X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.146.87) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Dec 2019 18:30:13 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 2969D3F6CB4 for ; Sun, 8 Dec 2019 12:30:05 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id e1JliMgeCHunhe1Jliewz2; Sun, 08 Dec 2019 12:30:05 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: 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=2kLMidJlW8qzUyFGKcGiJz6szPj6ThqIaaYG8fSYJZk=; b=mXiN9FySQOmrPXHApi5UlC2uwB LREjpkm7iHZgkWlsITSphX1k5vvxIGXCJHWkiF9JNpziDRPZNaI6Tj1OuLNC7DznqezkQkf+6nlOM R6VIY3vXtWi9uQomBkZVf+/NB; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:53622 helo=bapiya.Home) by box5379.bluehost.com with esmtpa (Exim 4.92) (envelope-from ) id 1ie1Jk-0045GG-VM; Sun, 08 Dec 2019 11:30:05 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 20/55] Introduce f_value_print_innner Date: Sun, 8 Dec 2019 11:29:23 -0700 Message-Id: <20191208182958.10181-21-tom@tromey.com> In-Reply-To: <20191208182958.10181-1-tom@tromey.com> References: <20191208182958.10181-1-tom@tromey.com> This introduces f_value_print_innner. gdb/ChangeLog 2019-12-08 Tom Tromey * f-valprint.c (f_value_print_innner): New function. * f-lang.h (f_value_print_innner): Declare. * f-lang.c (f_language_defn): Use f_value_print_innner. Change-Id: Idad231ae7a8fd07a65fc82f13d790b1fae899ba2 --- gdb/ChangeLog | 6 ++++++ gdb/f-lang.c | 2 +- gdb/f-lang.h | 6 ++++++ gdb/f-valprint.c | 10 ++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/gdb/f-lang.c b/gdb/f-lang.c index b8a684e5cf5..0d587ea020b 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -647,7 +647,7 @@ extern const struct language_defn f_language_defn = f_print_type, /* Print a type using appropriate syntax */ f_print_typedef, /* Print a typedef using appropriate syntax */ f_val_print, /* Print a value using appropriate syntax */ - nullptr, /* la_value_print_inner */ + f_value_print_innner, /* la_value_print_inner */ c_value_print, /* FIXME */ default_read_var_value, /* la_read_var_value */ NULL, /* Language specific skip_trampoline */ diff --git a/gdb/f-lang.h b/gdb/f-lang.h index cf6024c4454..8b0f3f262df 100644 --- a/gdb/f-lang.h +++ b/gdb/f-lang.h @@ -41,6 +41,12 @@ extern void f_val_print (struct type *, int, CORE_ADDR, struct value *, const struct value_print_options *); +/* Implement la_value_print_inner for Fortran. */ + +extern void f_value_print_innner (struct value *val, struct ui_file *stream, + int recurse, + const struct value_print_options *options); + /* Language-specific data structures */ /* A common block. */ diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index 10aeb7dc53d..9eccabbcd52 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -370,6 +370,16 @@ f_val_print (struct type *type, int embedded_offset, } } +/* See f-lang.h. */ + +void +f_value_print_innner (struct value *val, struct ui_file *stream, int recurse, + const struct value_print_options *options) +{ + f_val_print (value_type (val), value_embedded_offset (val), + value_address (val), stream, recurse, val, options); +} + static void info_common_command_for_block (const struct block *block, const char *comname, int *any_printed)