[RFA] backtrace in mixed language applications (take 2)
Joel Brobecker
brobecker@adacore.com
Mon Feb 4 20:56:00 GMT 2008
> > common_val_print (val, stb->stream, 0, 0, 2,
> > - Val_no_prettyprint);
> > + Val_no_prettyprint,
> > + language_def (SYMBOL_LANGUAGE (sym)));
> > ui_out_field_stream (uiout, "value", stb);
> > }
> > else
>
> The patch looks sane to me, except for this, which ignores "set
> language" - compare to the code in select_frame. Do you think we
> ought to honor it here if it's been set?
Good catch. I don't have any clear reason why we should change
the previous behavior in this case, so I've tweaked the previous
patch to honor "set language". I also added a test in the new
testcase to verify this. The rest of the patch should be identical.
2008-02-04 Joel Brobecker <brobecker@adacore.com>
* 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.
2008-02-04 Jerome Guitton <guitton@adacore.com>
Joel Brobecker <brobecker@adacore.com>
* gdb.ada/lang_switch: New test program.
* gdb.ada/lang_switch.exp: New testcase.
Tested on x86-linux. No regression.
OK to apply?
Thanks,
--
Joel
More information about the Gdb-patches
mailing list