From patchwork Sun Dec 8 18:29:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 36587 Received: (qmail 101512 invoked by alias); 8 Dec 2019 18:30:25 -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 101179 invoked by uid 89); 8 Dec 2019 18:30:16 -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=H*r:esmtpa, HX-Spam-Relays-External:esmtpa, H*RU:esmtpa X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.46.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Dec 2019 18:30:13 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway21.websitewelcome.com (Postfix) with ESMTP id A088E400C63DB for ; Sun, 8 Dec 2019 12:30:04 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id e1JkiNEihOdBHe1JkiXAB3; Sun, 08 Dec 2019 12:30:04 -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=Qn/MkW8KOv4mn01EvwVHfAQ2Vu1uSntjguPx0pWL6bM=; b=BXVrQyo5gph5Ij1wSWqerFh+TN 4TjWHXxRH06t6roUyMWWDNUMmWfNnLaHI+PdC9kHLRk5n01i+zo7g4A+zUfKYtRluXWn3ekS63pZ8 +vGYwA3EOEl/PK/4VtXfJatvg; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:53620 helo=bapiya.Home) by box5379.bluehost.com with esmtpa (Exim 4.92) (envelope-from ) id 1ie1Jk-0045Dk-F0; Sun, 08 Dec 2019 11:30:04 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 19/55] Introduce pascal_value_print_inner Date: Sun, 8 Dec 2019 11:29:22 -0700 Message-Id: <20191208182958.10181-20-tom@tromey.com> In-Reply-To: <20191208182958.10181-1-tom@tromey.com> References: <20191208182958.10181-1-tom@tromey.com> This introduces pascal_value_print_inner. gdb/ChangeLog 2019-12-08 Tom Tromey * p-valprint.c (pascal_value_print_inner): New function. * p-lang.h (pascal_value_print_inner): Declare. * p-lang.c (pascal_language_defn): Use pascal_value_print_inner. Change-Id: I2e560738ac59e2ee99874e65920d3f60ea179bc7 --- gdb/ChangeLog | 6 ++++++ gdb/p-lang.c | 2 +- gdb/p-lang.h | 5 +++++ gdb/p-valprint.c | 13 +++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/gdb/p-lang.c b/gdb/p-lang.c index 3229c3e9c9f..85020c4bedc 100644 --- a/gdb/p-lang.c +++ b/gdb/p-lang.c @@ -448,7 +448,7 @@ extern const struct language_defn pascal_language_defn = pascal_print_type, /* Print a type using appropriate syntax */ pascal_print_typedef, /* Print a typedef using appropriate syntax */ pascal_val_print, /* Print a value using appropriate syntax */ - nullptr, /* la_value_print_inner */ + pascal_value_print_inner, /* la_value_print_inner */ pascal_value_print, /* Print a top-level value */ default_read_var_value, /* la_read_var_value */ NULL, /* Language specific skip_trampoline */ diff --git a/gdb/p-lang.h b/gdb/p-lang.h index 1376bc2c94a..fafc86c78c4 100644 --- a/gdb/p-lang.h +++ b/gdb/p-lang.h @@ -42,6 +42,11 @@ extern void pascal_val_print (struct type *, int, struct value *, const struct value_print_options *); +/* Implement la_value_print_inner for Pascal. */ + +extern void pascal_value_print_inner (struct value *, struct ui_file *, int, + const struct value_print_options *); + extern void pascal_value_print (struct value *, struct ui_file *, const struct value_print_options *); diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 9420509066b..c24b8edfdeb 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -425,6 +425,19 @@ pascal_val_print (struct type *type, TYPE_CODE (type)); } } + +/* See p-lang.h. */ + +void +pascal_value_print_inner (struct value *val, struct ui_file *stream, + int recurse, + const struct value_print_options *options) + +{ + pascal_val_print (value_type (val), value_embedded_offset (val), + value_address (val), stream, recurse, val, options); +} + void pascal_value_print (struct value *val, struct ui_file *stream,