This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 2/7] API for inhibiting section map updates
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 20 May 2013 08:22:12 -0600
- Subject: Re: [RFA 2/7] API for inhibiting section map updates
- References: <20130516144340 dot GA2105 at blade dot nx> <20130516144813 dot GC2105 at blade dot nx>
>>>>> "Gary" == Gary Benson <gbenson@redhat.com> 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?
Tom