diff options
author | Joel Brobecker <brobecker@gnat.com> | 2008-05-06 21:35:01 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2008-05-06 21:35:01 +0000 |
commit | d8ca156b0e90ca9549bde4a88c2c2f27127f71a7 (patch) | |
tree | 6e3dcc04ed2388f8fab12af288022cd1045e91f6 /gdb/mi | |
parent | 2b706932eef86b25a7a833b0e3136d3a0429bfab (diff) | |
download | gdb-d8ca156b0e90ca9549bde4a88c2c2f27127f71a7.zip gdb-d8ca156b0e90ca9549bde4a88c2c2f27127f71a7.tar.gz gdb-d8ca156b0e90ca9549bde4a88c2c2f27127f71a7.tar.bz2 |
* valprint.c (val_print): Add new language parameter and use it
instead of using the current_language. Update calls to val_print
throughout.
(common_val_print): Add new langauge parameter and pass it to
val_print.
* value.h (struct language_defn): Add opaque declaration.
(val_print, common_val_print): Update declarations.
* stack.c (print_frame_args): Update call to common_val_print
using the appropriate language.
* mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
* c-valprint, f-valprint.c, m2-valprint.c, mt-tdep.c, infcmd.c,
mi/mi-main.c, jv-valprint.c, ada-valprint.c, varobj.c, p-valprint.c,
scm-valprint.c, cp-valprint.c, sh64-tdep.c, printcmd.c:
#include "language.h" if necessary.
Update calls to val_print and common_val_print.
* Makefile.in (mt-tdep.o, sh64-tdep.o, mi-cmds.o, mi-main.o):
Update dependencies.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmd-stack.c | 7 | ||||
-rw-r--r-- | gdb/mi/mi-main.c | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 0a62924..4d38867 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -29,6 +29,7 @@ #include "stack.h" #include "dictionary.h" #include "gdb_string.h" +#include "language.h" static void list_args_or_locals (int locals, int values, struct frame_info *fi); @@ -298,7 +299,8 @@ list_args_or_locals (int locals, int values, struct frame_info *fi) { val = read_var_value (sym2, fi); common_val_print - (val, stb->stream, 0, 1, 0, Val_no_prettyprint); + (val, stb->stream, 0, 1, 0, Val_no_prettyprint, + language_def (SYMBOL_LANGUAGE (sym2))); ui_out_field_stream (uiout, "value", stb); } do_cleanups (cleanup_tuple); @@ -306,7 +308,8 @@ list_args_or_locals (int locals, int values, struct frame_info *fi) case PRINT_ALL_VALUES: val = read_var_value (sym2, fi); common_val_print - (val, stb->stream, 0, 1, 0, Val_no_prettyprint); + (val, stb->stream, 0, 1, 0, Val_no_prettyprint, + language_def (SYMBOL_LANGUAGE (sym2))); ui_out_field_stream (uiout, "value", stb); do_cleanups (cleanup_tuple); break; diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 9dce9b0..4ae509e 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -44,6 +44,7 @@ #include "gdb.h" #include "frame.h" #include "mi-main.h" +#include "language.h" #include <ctype.h> #include <sys/time.h> @@ -541,7 +542,8 @@ get_register (int regnum, int format) else { val_print (register_type (current_gdbarch, regnum), buffer, 0, 0, - stb->stream, format, 1, 0, Val_pretty_default); + stb->stream, format, 1, 0, Val_pretty_default, + current_language); ui_out_field_stream (uiout, "value", stb); ui_out_stream_delete (stb); } @@ -629,7 +631,7 @@ mi_cmd_data_evaluate_expression (char *command, char **argv, int argc) /* Print the result of the expression evaluation. */ val_print (value_type (val), value_contents (val), value_embedded_offset (val), VALUE_ADDRESS (val), - stb->stream, 0, 0, 0, 0); + stb->stream, 0, 0, 0, 0, current_language); ui_out_field_stream (uiout, "value", stb); ui_out_stream_delete (stb); |