Make current_source_* per-program-space
This changes current_source_symtab and current_source_line to be
per-program-space. This ensures that switching inferiors will
preserve the current "list" location for that inferior, and also
ensures that the default expression evaluation context always comes
with the current inferior.
No test case, because the latter problem crops up with an existing
gdb.multi test case once this entire series has been applied.
gdb/ChangeLog
2019-10-02 Tom Tromey <tromey@adacore.com>
* source.c (struct current_source_location): New.
(current_source_key): New global.
(current_source_symtab, current_source_line)
(current_source_pspace): Remove.
(get_source_location): New function.
(get_current_source_symtab_and_line)
(set_default_source_symtab_and_line)
(set_current_source_symtab_and_line)
(clear_current_source_symtab_and_line, select_source_symtab)
(info_source_command, print_source_lines_base)
(info_line_command, search_command_helper, _initialize_source):
Update.