From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id F0922394BE38; Sat, 14 Mar 2020 00:06:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F0922394BE38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1584144366; bh=vEruNipMw6TQOIRAoIRYnGwPEuaAVUnhxWgI+nl5d5w=; h=From:To:Subject:Date:From; b=nlXFbWoF4nq3HyDM5lSCbHbP/kSkXwf5k1cSIh8SIHIzglY8U3G3Q82KQas8jmstB q25H9L1cPA9blGT18T+18wJmV0nqxm4q1rBgZO4dV+sbppcTII+hs4CYvfBWbZ8+DO p+R5xoxEougPry+ThbREks6XqPOK92Sog5MAmK7c= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Introduce ada_value_print_inner X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 24051bbe843abcdcc108542da195e009c3f19910 X-Git-Newrev: 26792ee0345c09bd1c76f3ee0e16ed15ab7215b9 Message-Id: <20200314000606.F0922394BE38@sourceware.org> Date: Sat, 14 Mar 2020 00:06:06 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2020 00:06:07 -0000 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=26792ee0345c09bd1c76f3ee0e16ed15ab7215b9 commit 26792ee0345c09bd1c76f3ee0e16ed15ab7215b9 Author: Tom Tromey Date: Fri Mar 13 17:39:52 2020 -0600 Introduce ada_value_print_inner This introduces ada_value_print_inner. gdb/ChangeLog 2020-03-13 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. Diff: --- 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/ChangeLog b/gdb/ChangeLog index 5e59716335a..25eb0f5efe1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-03-13 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. + 2020-03-13 Tom Tromey * f-valprint.c (f_value_print_innner): New function. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index fb3bfa5aba9..9fb59e3a628 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -14110,7 +14110,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 e388c7528b3..f7c09519be6 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 b918caf473f..c983cbbab71 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -1222,6 +1222,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)