+2020-10-29  Tom Tromey  <tom@tromey.com>
+
+       * source-cache.c (source_cache::get_plain_source_lines): Use
+       current_program_space.
+       * corefile.c (reopen_exec_file): Use current_program_space.
+       * exec.c (exec_file_attach): Use current_program_space.
+       * exec.h (exec_bfd_mtime): Remove.
+
 2020-10-29  Tom Tromey  <tom@tromey.com>
 
        * gcore.c (default_gcore_mach): Remove.
 
   std::string filename = bfd_get_filename (exec_bfd);
   res = stat (filename.c_str (), &st);
 
-  if (res == 0 && exec_bfd_mtime && exec_bfd_mtime != st.st_mtime)
+  if (res == 0
+      && current_program_space->ebfd_mtime
+      && current_program_space->ebfd_mtime != st.st_mtime)
     exec_file_attach (filename.c_str (), 0);
   else
     /* If we accessed the file since last opening it, close it now;
 
 
       target_section_table sections = build_section_table (exec_bfd);
 
-      exec_bfd_mtime = bfd_get_mtime (exec_bfd);
+      current_program_space->ebfd_mtime = bfd_get_mtime (exec_bfd);
 
       validate_files ();
 
 
 struct objfile;
 
 #define exec_bfd current_program_space->ebfd
-#define exec_bfd_mtime current_program_space->ebfd_mtime
 
 /* Builds a section table, given args BFD.  */
 
 
   if (SYMTAB_OBJFILE (s) != NULL && SYMTAB_OBJFILE (s)->obfd != NULL)
     mtime = SYMTAB_OBJFILE (s)->mtime;
   else if (exec_bfd)
-    mtime = exec_bfd_mtime;
+    mtime = current_program_space->ebfd_mtime;
 
   if (mtime && mtime < st.st_mtime)
     warning (_("Source file is more recent than executable."));