summaryrefslogtreecommitdiff
path: root/gdb/ada-valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-10-20 14:25:21 -0600
committerTom Tromey <tromey@adacore.com>2021-10-29 07:46:28 -0600
commit7a72f09da5c62a213952752c9659e7686e1dd4ab (patch)
tree88853f0b09b6b7ba7564f82bd9d5b3dbdaef380f /gdb/ada-valprint.c
parent52429bbd71af5f14f8f3f5a962a2457a93c6d171 (diff)
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.
Diffstat (limited to 'gdb/ada-valprint.c')
-rw-r--r--gdb/ada-valprint.c29
1 files changed, 5 insertions, 24 deletions
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 (),
- _("<error reading variable: %s>"),
- except.what ());
- }
-}
-
void
ada_value_print (struct value *val0, struct ui_file *stream,
const struct value_print_options *options)