This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFAv2 0/5] Use language mode in 'info [functions|variables|types]|rbreak'
- From: Pedro Alves <palves at redhat dot com>
- To: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>, gdb-patches at sourceware dot org
- Date: Sat, 17 Nov 2018 19:19:37 +0000
- Subject: Re: [RFAv2 0/5] Use language mode in 'info [functions|variables|types]|rbreak'
- References: <20181117120445.10805-1-philippe.waroquiers@skynet.be>
On 11/17/2018 12:04 PM, Philippe Waroquiers wrote:
> The commands 'info [functions|variables|types]|rbreak' work
> on the global program, not only in the current frame.
> So in in mixed languages program, these commands examine and print
> entities defined in different languages.
>
> Now, GDB uses the current language to print all the results of
> these commands, which is somewhat surprising.
>
> For example, when the current frame is in Ada,
> info function gethostbyname gives:
> File ../nss/getXXbyYY.c:
> 87: function gethostbyname (a1: access char) return access hostent;
>
> This patch series ensures that these commands respect the 'set language auto'
> setup, to print the results in the language used to define the printed
> entities.
>
> This is the second version of the patch series, which handles all the
> comments of Eli and Pedro.
>
> For the documentation, the changes are
> * gdb.texinfo: Added references to 'set language'.
> * NEWS: Better sentence, as suggested by Eli.
>
> For the code and test, all suggestions of Pedro were done,
> a.o. change the class name to scoped_switch_to_sym_language_if_auto
> which is more clear, change the test to have a better gdb.sum.
>
> Thanks for the review, ok to push ?
OK.
Thanks,
Pedro Alves