From d8ca156b0e90ca9549bde4a88c2c2f27127f71a7 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 6 May 2008 21:35:01 +0000 Subject: * 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. --- gdb/c-valprint.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gdb/c-valprint.c') diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 5206569..23f097a 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -274,7 +274,8 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, } vt_val = value_at (wtype, vt_address); common_val_print (vt_val, stream, format, - deref_ref, recurse + 1, pretty); + deref_ref, recurse + 1, pretty, + current_language); if (pretty) { fprintf_filtered (stream, "\n"); @@ -312,7 +313,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, unpack_pointer (lookup_pointer_type (builtin_type_void), valaddr + embedded_offset)); common_val_print (deref_val, stream, format, deref_ref, - recurse, pretty); + recurse, pretty, current_language); } else fputs_filtered ("???", stream); @@ -618,7 +619,8 @@ c_value_print (struct value *val, struct ui_file *stream, int format, /* Print out object: enclosing type is same as real_type if full */ return val_print (value_enclosing_type (val), value_contents_all (val), 0, - VALUE_ADDRESS (val), stream, format, 1, 0, pretty); + VALUE_ADDRESS (val), stream, format, 1, 0, + pretty, current_language); /* Note: When we look up RTTI entries, we don't get any information on const or volatile attributes */ } @@ -629,7 +631,8 @@ c_value_print (struct value *val, struct ui_file *stream, int format, TYPE_NAME (value_enclosing_type (val))); return val_print (value_enclosing_type (val), value_contents_all (val), 0, - VALUE_ADDRESS (val), stream, format, 1, 0, pretty); + VALUE_ADDRESS (val), stream, format, 1, 0, + pretty, current_language); } /* Otherwise, we end up at the return outside this "if" */ } @@ -637,5 +640,5 @@ c_value_print (struct value *val, struct ui_file *stream, int format, return val_print (type, value_contents_all (val), value_embedded_offset (val), VALUE_ADDRESS (val) + value_offset (val), - stream, format, 1, 0, pretty); + stream, format, 1, 0, pretty, current_language); } -- cgit v1.1