This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix frame argument printing when using auto language mode
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: Xavier Roirand <roirand at adacore dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Thu, 22 Feb 2018 07:38:27 +0400
- Subject: Re: [RFA] Fix frame argument printing when using auto language mode
- Authentication-results: sourceware.org; auth=none
- References: <1519044767-8741-1-git-send-email-roirand@adacore.com> <CAH=s-PM+9dGs12pLNDZTcr69tdkTMDdyFhAwhHHL037vkvqCKQ@mail.gmail.com> <fc85a90b-93b3-0b75-6a37-dc58be650d80@adacore.com> <CAH=s-PNXHw=9peQkB23_g-dKKcXCiBP20tvG9Tbx9mJ5hmR+9A@mail.gmail.com>
Hi Yao,
> We don't have to do that. ada_val_print_1 is called in ada_val_print,
>
> ada_val_print_1 (type, embedded_offset, address,
> stream, recurse, val, options,
> current_language);
>
> and ada_val_print is language->la_val_print in effect, so "language"
> is ada_language_defn, and we can rewrite the code above like this,
>
> ada_val_print_1 (type, embedded_offset, address,
> stream, recurse, val, options,
> &ada_language_defn);
>
> This change may break existing behaviour. Printing for ada (or other
> languages) shouldn't depend on current_language, IMO.
Thanks for the extra pair of eyes, and the pertinent suggestions!
FWIW, I agree with you, your fix is much better.
--
Joel