Tom Tromey wrote: > >>>>> "Gary" == Gary Benson writes: > > Gary> +void > Gary> +inhibit_section_map_updates (void) > Gary> +{ > Gary> + get_objfile_pspace_data (current_program_space)->inhibit_updates = 1; > Gary> +} > Gary> + > Gary> +/* See comments in objfiles.h. */ > Gary> + > Gary> +void > Gary> +resume_section_map_updates (void) > Gary> +{ > Gary> + get_objfile_pspace_data (current_program_space)->inhibit_updates = 0; > Gary> +} > Gary> + > Gary> +/* See comments in objfiles.h. */ > Gary> + > Gary> +void > Gary> +resume_section_map_updates_cleanup (void *arg) > Gary> +{ > Gary> + resume_section_map_updates (); > Gary> } > > It seems like it might be slightly safer if these all took the > program space as an argument. That way if something happens to > change the current program space, then, e.g., the cleanup will > still affect the program space for which it was made. > > What do you think of that? That's an excellent idea. The attached patch implements this. Cheers, Gary