make language_of_main static

This makes the global language_of_main static.  Now it can be set only
via a new argument to set_main_name.

2014-01-15  Tom Tromey  <tromey@redhat.com>

	* dbxread.c (process_one_symbol): Update.
	* dwarf2read.c (read_partial_die): Update.
	* symfile.c (set_initial_language): Call main_language.
	* symtab.c (language_of_main): Now static.
	(set_main_name): Add 'lang' parameter.
	(find_main_name): Update.
	(main_language): New function.
	(symtab_observer_executable_changed): Update.
	* symtab.h (set_main_name): Update.
	(language_of_main): Remove.
	(main_language): Declare.
This commit is contained in:
Tom Tromey
2013-12-30 20:05:34 -07:00
parent 6ef55de768
commit 9e6c82ad4f
6 changed files with 37 additions and 22 deletions

View File

@@ -3250,7 +3250,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
N_MAIN within a given objfile, complain() and choose
arbitrarily. (kingdon) */
if (name != NULL)
set_main_name (name);
set_main_name (name, language_unknown);
break;
/* The following symbol types can be ignored. */