From patchwork Sun Dec 8 18:29:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 36632 Received: (qmail 26861 invoked by alias); 8 Dec 2019 18:51:08 -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 26852 invoked by uid 89); 8 Dec 2019 18:51:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 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= X-HELO: gateway24.websitewelcome.com Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.51.31) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Dec 2019 18:51:07 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 5E2FB1CF1 for ; Sun, 8 Dec 2019 12:30:05 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id e1JliZZ7G4kpje1Jli9V3N; 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=BYRm2FUS3xRPGZ4aW/I8+PJKTatHP8HC8Ea2fGKJdsc=; b=mfrpwVrCUEws4/IwQrSM7Si8+U BGDOQOK/H+QEobUmQKW5DovlL0hEdbDu+p+RIKQXDqjVX+B4+/aQYHohJMyDiLSN84MSTYTxpVEs7 1iF00ZDYO0V0x0kHMtTbIIMlY; 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 1ie1Jl-0045GG-53; Sun, 08 Dec 2019 11:30:05 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 21/55] Introduce ada_value_print_inner Date: Sun, 8 Dec 2019 11:29:24 -0700 Message-Id: <20191208182958.10181-22-tom@tromey.com> In-Reply-To: <20191208182958.10181-1-tom@tromey.com> References: <20191208182958.10181-1-tom@tromey.com> This introduces ada_value_print_inner. gdb/ChangeLog 2019-12-08 Tom Tromey * ada-valprint.c (ada_value_print_inner): New function. * ada-lang.h (ada_value_print_inner): Declare. * ada-lang.c (ada_language_defn): Use ada_value_print_inner. Change-Id: I88786b629ba0fe08f508b968f2a1a301dfe1c25f --- gdb/ChangeLog | 6 ++++++ gdb/ada-lang.c | 2 +- gdb/ada-lang.h | 5 +++++ gdb/ada-valprint.c | 11 +++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index eeccfae69ac..42ebf31954a 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -14114,7 +14114,7 @@ extern const struct language_defn ada_language_defn = { ada_print_type, /* Print a type using appropriate syntax */ ada_print_typedef, /* Print a typedef using appropriate syntax */ ada_val_print, /* Print a value using appropriate syntax */ - nullptr, /* la_value_print_inner */ + ada_value_print_inner, /* la_value_print_inner */ ada_value_print, /* Print a top-level value */ ada_read_var_value, /* la_read_var_value */ NULL, /* Language specific skip_trampoline */ diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 13a917affec..f9994340a68 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -169,6 +169,11 @@ extern void ada_val_print (struct type *, int, CORE_ADDR, struct value *, const struct value_print_options *); +/* Implement la_value_print_inner for Ada. */ + +extern void ada_value_print_inner (struct value *, struct ui_file *, int, + const struct value_print_options *); + extern void ada_value_print (struct value *, struct ui_file *, const struct value_print_options *); diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 4bb9247f519..609e5af7481 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -1219,6 +1219,17 @@ ada_val_print (struct type *type, } } +/* See ada-lang.h. */ + +void +ada_value_print_inner (struct value *val, struct ui_file *stream, + int recurse, + const struct value_print_options *options) +{ + ada_val_print (value_type (val), value_embedded_offset (val), + value_address (val), stream, recurse, val, options); +} + void ada_value_print (struct value *val0, struct ui_file *stream, const struct value_print_options *options)