From 362501dc5c85ae67c7141292ed5be1bfbd334645 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 22 Jan 2022 16:31:52 -0700 Subject: [PATCH] Remove LA_PRINT_CHAR This removes the LA_PRINT_CHAR macro, in favor of using ordinary method calls. --- gdb/ada-valprint.c | 2 +- gdb/c-valprint.c | 3 ++- gdb/language.h | 2 -- gdb/typeprint.c | 2 +- gdb/valprint.c | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index adab6b42f5b..a59c392bef4 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -402,7 +402,7 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream) break; case TYPE_CODE_CHAR: - LA_PRINT_CHAR (val, type, stream); + current_language->printchar (val, type, stream); break; case TYPE_CODE_BOOL: diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index fadbc5b7022..047e5687b0a 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -409,7 +409,8 @@ c_value_print_int (struct value *val, struct ui_file *stream, if (c_textual_element_type (type, options->format)) { fputs_filtered (" ", stream); - LA_PRINT_CHAR (unpack_long (type, valaddr), type, stream); + current_language->printchar (unpack_long (type, valaddr), type, + stream); } } } diff --git a/gdb/language.h b/gdb/language.h index 3930f5bd223..4eb414bbe12 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -755,8 +755,6 @@ extern enum language set_language (enum language); the current setting of working_lang, which the user sets with the "set language" command. */ -#define LA_PRINT_CHAR(ch, type, stream) \ - (current_language->printchar (ch, type, stream)) #define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses, options) \ (current_language->printstr (stream, elttype, string, length, \ encoding, force_ellipses,options)) diff --git a/gdb/typeprint.c b/gdb/typeprint.c index c15a9c6b59f..8cb34ad1921 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -647,7 +647,7 @@ print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream) break; case TYPE_CODE_CHAR: - LA_PRINT_CHAR ((unsigned char) val, type, stream); + current_language->printchar ((unsigned char) val, type, stream); break; case TYPE_CODE_BOOL: diff --git a/gdb/valprint.c b/gdb/valprint.c index 25e4a8dc8e1..07bc324be5d 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -791,7 +791,7 @@ generic_value_print_char (struct value *value, struct ui_file *stream, else fprintf_filtered (stream, "%d", (int) val); fputs_filtered (" ", stream); - LA_PRINT_CHAR (val, unresolved_type, stream); + current_language->printchar (val, unresolved_type, stream); } } -- 2.30.2