]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: pass program space to objfiles_changed
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 16 May 2024 20:59:32 +0000 (16:59 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 15 Jul 2024 18:34:12 +0000 (14:34 -0400)
Make the current program space reference bubble up one level.

Change-Id: I9b33c9e0d22c171eb1bb59ce480621b02c7b7bf7
Approved-By: Tom Tromey <tom@tromey.com>
Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
gdb/objfiles.c
gdb/objfiles.h
gdb/symfile.c

index 67021581d3caa7a2bc7f27a8fc02995f656f0264..cf1f3ae0653d491e5146e65e7859974776bd2638 100644 (file)
@@ -1163,16 +1163,14 @@ pc_in_section (CORE_ADDR pc, const char *name)
          && s->the_bfd_section->name != nullptr
          && strcmp (s->the_bfd_section->name, name) == 0);
 }
-\f
 
-/* Set section_map_dirty so section map will be rebuilt next time it
-   is used.  Called by reread_symbols.  */
+/* See objfiles.h.  */
 
 void
-objfiles_changed (void)
+objfiles_changed (program_space *pspace)
 {
   /* Rebuild section map next time we need it.  */
-  get_objfile_pspace_data (current_program_space)->section_map_dirty = 1;
+  get_objfile_pspace_data (pspace)->section_map_dirty = 1;
 }
 
 /* See comments in objfiles.h.  */
index 252b52e226e9c6e5db19d695838adc1624b949bc..6a4724a4be591fdf5ceb645411a881079a493276 100644 (file)
@@ -943,7 +943,10 @@ extern bool have_full_symbols (program_space *pspace);
 extern void objfile_set_sym_fns (struct objfile *objfile,
                                 const struct sym_fns *sf);
 
-extern void objfiles_changed (void);
+/* Set section_map_dirty for PSPACE so the section map will be rebuilt next time
+   it is used.  */
+
+extern void objfiles_changed (program_space *pspace);
 
 /* Return true if ADDR maps into one of the sections of OBJFILE and false
    otherwise.  */
index a4f964a8bac16a57dabb820bcca3497b38f89bc0..caf0aa64d5c9e378956d62bd083a16c33ffd0f9e 100644 (file)
@@ -2613,7 +2613,7 @@ reread_symbols (int from_tty)
             making the dangling pointers point to correct data
             again.  */
 
-         objfiles_changed ();
+         objfiles_changed (current_program_space);
 
          /* Recompute section offsets and section indices.  */
          objfile->sf->sym_offsets (objfile, {});