public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFAv2 0/5] Use language mode in 'info [functions|variables|types]|rbreak'
@ 2018-11-17 12:04 Philippe Waroquiers
  2018-11-17 12:04 ` [RFAv2 1/5] Add class scoped_switch_to_sym_language_if_auto Philippe Waroquiers
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Philippe Waroquiers @ 2018-11-17 12:04 UTC (permalink / raw)
  To: gdb-patches

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 ?


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-11-30 23:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-17 12:04 [RFAv2 0/5] Use language mode in 'info [functions|variables|types]|rbreak' Philippe Waroquiers
2018-11-17 12:04 ` [RFAv2 1/5] Add class scoped_switch_to_sym_language_if_auto Philippe Waroquiers
2018-11-17 12:05 ` [RFAv2 4/5] Document language choice in 'info [functions|variables|types]|rbreak' commands Philippe Waroquiers
2018-11-17 12:05 ` [RFAv2 5/5] NEWS: Document the language choice by 'info [types|functions|variables]|rbreak' Philippe Waroquiers
2018-11-17 12:05 ` [RFAv2 2/5] Use scoped_switch_to_sym_language_if_auto in symtab.c to switch language Philippe Waroquiers
2018-11-17 12:05 ` [RFAv2 3/5] Add a test to verify info [functions|variables|types]|rbreak respect language_mode Philippe Waroquiers
2018-11-30 20:46   ` New FAILs added by gdb.ada/info_auto_lang.exp (was: Re: [RFAv2 3/5] Add a test to verify info [functions|variables|types]|rbreak respect language_mode.) Sergio Durigan Junior
2018-11-30 23:26     ` Philippe Waroquiers
2018-11-17 19:19 ` [RFAv2 0/5] Use language mode in 'info [functions|variables|types]|rbreak' Pedro Alves
2018-11-20 21:59   ` Philippe Waroquiers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).