Remove LA_PRINT_STRING

This removes the LA_PRINT_STRING macro, in favor of using ordinary
method calls.
This commit is contained in:
Tom Tromey
2022-01-22 16:32:48 -07:00
parent 362501dc5c
commit 660da3c14b
4 changed files with 8 additions and 18 deletions

View File

@ -277,7 +277,7 @@ c_value_print_array (struct value *val,
++temp_len)
;
/* Force LA_PRINT_STRING to print ellipses if
/* Force printstr to print ellipses if
we've printed the maximum characters and
the next character is not \000. */
if (temp_len == options->print_max && temp_len < len)
@ -292,7 +292,7 @@ c_value_print_array (struct value *val,
len = temp_len;
}
LA_PRINT_STRING (stream, unresolved_elttype, valaddr, len,
current_language->printstr (stream, unresolved_elttype, valaddr, len,
NULL, force_ellipses, options);
}
else

View File

@ -750,15 +750,6 @@ extern void language_info ();
extern enum language set_language (enum language);
/* This page contains functions that return things that are
specific to languages. Each of these functions is based on
the current setting of working_lang, which the user sets
with the "set language" command. */
#define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses, options) \
(current_language->printstr (stream, elttype, string, length, \
encoding, force_ellipses,options))
/* Test a character to decide whether it can be printed in literal form
or needs to be printed in another representation. For example,
in C the literal form of the character with octal value 141 is 'a'

View File

@ -2767,10 +2767,9 @@ val_print_string (struct type *elttype, const char *encoding,
But if we fetch something and then get an error, print the string
and then the error message. */
if (err == 0 || bytes_read > 0)
{
LA_PRINT_STRING (stream, elttype, buffer.get (), bytes_read / width,
current_language->printstr (stream, elttype, buffer.get (),
bytes_read / width,
encoding, force_ellipsis, options);
}
if (err != 0)
{

View File

@ -2232,7 +2232,7 @@ varobj_value_get_print_value (struct value *value,
/* If the THEVALUE has contents, it is a regular string. */
if (!thevalue.empty ())
LA_PRINT_STRING (&stb, type, (gdb_byte *) thevalue.c_str (),
current_language->printstr (&stb, type, (gdb_byte *) thevalue.c_str (),
len, encoding.get (), 0, &opts);
else if (string_print)
/* Otherwise, if string_print is set, and it is not a regular