From 7a72f09da5c62a213952752c9659e7686e1dd4ab Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 20 Oct 2021 14:25:21 -0600 Subject: Remove ada_value_print_inner I noticed that the only caller of ada_value_print_inner is valprint.c:do_val_print (via ada_language::value_print_inner), meaning that the try/catch logic in this function is redundant. This patch removes the wrapper function. Regression tested on x86-64 Fedora 34. --- gdb/ada-valprint.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'gdb/ada-valprint.c') diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 17cace04d3..6be16ee17e 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -978,12 +978,12 @@ ada_val_print_ref (struct type *type, const gdb_byte *valaddr, } /* See the comment on ada_value_print. This function differs in that - it does not catch evaluation errors (leaving that to - ada_value_print). */ + it does not catch evaluation errors (leaving that to its + caller). */ -static void -ada_value_print_1 (struct value *val, struct ui_file *stream, int recurse, - const struct value_print_options *options) +void +ada_value_print_inner (struct value *val, struct ui_file *stream, int recurse, + const struct value_print_options *options) { struct type *type = ada_check_typedef (value_type (val)); @@ -1071,25 +1071,6 @@ ada_value_print_1 (struct value *val, struct ui_file *stream, int recurse, } } -/* See ada-lang.h. */ - -void -ada_value_print_inner (struct value *val, struct ui_file *stream, - int recurse, - const struct value_print_options *options) -{ - try - { - ada_value_print_1 (val, stream, recurse, options); - } - catch (const gdb_exception_error &except) - { - fprintf_styled (stream, metadata_style.style (), - _(""), - except.what ()); - } -} - void ada_value_print (struct value *val0, struct ui_file *stream, const struct value_print_options *options) -- cgit v1.2.3