move main name into the progspace
authorTom Tromey <tromey@redhat.com>
Tue, 31 Dec 2013 03:18:24 +0000 (20:18 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 15 Jan 2014 19:06:04 +0000 (12:06 -0700)
commit32ac0d11e648f4d5fa07c347ab109222a1162a0e
tree1f68c86d3174212cb335d3ca6bd26813462c67de
parent9e6c82ad4f55d0ff125721b94fa2191f1cc1000a
move main name into the progspace

This moves the "main" name and language into an object attached to the
current progspace.  This prevents problems if there are multiple
inferiors tha have different ideas of "main" -- which matters at least
for unwinding, see frame.c:inside_main_func.

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

* symtab.c (main_progspace_key): New global.
(struct main_info): New.
(name_of_main, language_of_main): Remove.
(get_main_info, main_info_cleanup): New function.
(set_main_name, main_name, main_language): Use get_main_info.
(_initialize_symtab): Initialize main_progspace_key.
gdb/ChangeLog
gdb/symtab.c