aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-22 16:32:48 -0700
committerTom Tromey <tom@tromey.com>2022-02-14 06:22:33 -0700
commit660da3c14b3b1815d6b3f1849a7225a10d819042 (patch)
tree569508305b97cfb486866c69a09fa3635e9cd213 /gdb
parent362501dc5c85ae67c7141292ed5be1bfbd334645 (diff)
downloadfsf-binutils-gdb-660da3c14b3b1815d6b3f1849a7225a10d819042.zip
fsf-binutils-gdb-660da3c14b3b1815d6b3f1849a7225a10d819042.tar.gz
fsf-binutils-gdb-660da3c14b3b1815d6b3f1849a7225a10d819042.tar.bz2
Remove LA_PRINT_STRING
This removes the LA_PRINT_STRING macro, in favor of using ordinary method calls.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/c-valprint.c6
-rw-r--r--gdb/language.h9
-rw-r--r--gdb/valprint.c7
-rw-r--r--gdb/varobj.c4
4 files changed, 8 insertions, 18 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 047e568..0d30700 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -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,8 +292,8 @@ c_value_print_array (struct value *val,
len = temp_len;
}
- LA_PRINT_STRING (stream, unresolved_elttype, valaddr, len,
- NULL, force_ellipses, options);
+ current_language->printstr (stream, unresolved_elttype, valaddr, len,
+ NULL, force_ellipses, options);
}
else
{
diff --git a/gdb/language.h b/gdb/language.h
index 4eb414b..f288500 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -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'
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 07bc324..d6ec648 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -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,
- encoding, force_ellipsis, options);
- }
+ current_language->printstr (stream, elttype, buffer.get (),
+ bytes_read / width,
+ encoding, force_ellipsis, options);
if (err != 0)
{
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 80216a4..5617131 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2232,8 +2232,8 @@ 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 (),
- len, encoding.get (), 0, &opts);
+ 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
string, it is a lazy string. */