aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-07-15 15:29:47 +0000
committerSimon Marchi <simon.marchi@efficios.com>2024-07-15 14:40:14 -0400
commit58a775a60632a6de3581176f330be16345aeabdc (patch)
tree89f0f628cec9f3943725c8371409f8c83225bb22
parent8991986e2413e2da383bef41855a7295ce323c9c (diff)
downloadgdb-58a775a60632a6de3581176f330be16345aeabdc.zip
gdb-58a775a60632a6de3581176f330be16345aeabdc.tar.gz
gdb-58a775a60632a6de3581176f330be16345aeabdc.tar.bz2
gdb: pass program space to overlay_invalidate_all
Make the current program space bubble up one level. Change-Id: I5ac1e3290ad266730465cd60aa3672d45ffa6475
-rw-r--r--gdb/symfile.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 2526998..06c7faf 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -91,8 +91,6 @@ static void symbol_file_add_main_1 (const char *args, symfile_add_flags add_flag
static const struct sym_fns *find_sym_fns (bfd *);
-static void overlay_invalidate_all (void);
-
static void simple_free_overlay_table (void);
static void read_target_long_array (CORE_ADDR, unsigned int *, int, int,
@@ -2972,13 +2970,13 @@ section_is_overlay (struct obj_section *section)
return 0;
}
-/* Function: overlay_invalidate_all (void)
- Invalidate the mapped state of all overlay sections (mark it as stale). */
+/* Invalidate the mapped state of all overlay sections (mark it as stale) in
+ PSPACE. */
static void
-overlay_invalidate_all (void)
+overlay_invalidate_all (program_space *pspace)
{
- for (objfile *objfile : current_program_space->objfiles ())
+ for (objfile *objfile : pspace->objfiles ())
for (obj_section *sect : objfile->sections ())
if (section_is_overlay (sect))
sect->ovly_mapped = -1;
@@ -3014,7 +3012,7 @@ section_is_mapped (struct obj_section *osect)
{
if (overlay_cache_invalid)
{
- overlay_invalidate_all ();
+ overlay_invalidate_all (current_program_space);
overlay_cache_invalid = 0;
}
if (osect->ovly_mapped == -1)