diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-08-14 15:05:48 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-10-23 10:57:14 +0100 |
commit | 00c696a6e2c2b1ea7ab39a25b15b5c0af0e58278 (patch) | |
tree | 54a16767b4983461168add0cd1068d37de00f7fc /gdb/valprint.c | |
parent | d3b67c56fa2ec8fd3664e0d9bf6648f4dd4222d8 (diff) | |
download | gdb-00c696a6e2c2b1ea7ab39a25b15b5c0af0e58278.zip gdb-00c696a6e2c2b1ea7ab39a25b15b5c0af0e58278.tar.gz gdb-00c696a6e2c2b1ea7ab39a25b15b5c0af0e58278.tar.bz2 |
gdb: remove LA_VALUE_PRINT macro
Remove the LA_VALUE_PRINT macro, and replace its uses with direct
calls to the value_print member function on an appropriate language.
In the global 'value_print' function, we call the value_print method
on the current_language, this is a direct inline replacement of the
old LA_VALUE_PRINT macro.
However, in ada-lang.c, and language.c the macro was being used
within the print_array_index member function of a language class. In
these cases we now call the value_print member function of the current
language class.
In theory, when we are inside (for example) the
ada_language::print_array_index function the current_language should
always be set to Ada, so this change should have no effect. However,
if we ever could get into ada_language::print_array_index with the
current language set to something else (which I think would have been
a bug) then we would now see a change in behaviour. I couldn't find
any cases where this happened though.
There should be no user visible changes after this commit, but it is
not impossible in some edge cases.
gdb/ChangeLog:
* ada-lang.c (ada_language::print_array_index): Call value_print
directly.
* language.c (language_defn::print_array_index): Likewise.
* language.h (LA_VALUE_PRINT): Delete.
* valprint.c (value_print): Call value_print on the
current_language directly.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r-- | gdb/valprint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index dd70a1a..880d04f 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1138,7 +1138,7 @@ value_print (struct value *val, struct ui_file *stream, return; } - LA_VALUE_PRINT (val, stream, options); + current_language->value_print (val, stream, options); } static void |