[patch 1/5] Call update_global_location_list conditionally in install_breakpoint
Pedro Alves
pedro@codesourcery.com
Wed Nov 16 19:04:00 GMT 2011
On Tuesday 15 November 2011 07:29:52, Yao Qi wrote:
> During `pending tracepoint' work, we find install_breakpoint calls
> update_global_location_list(1), which may throw error, and we have (at
> the end of create_break() ):
>
> /* That's it. Discard the cleanups for data inserted into the
> breakpoint. */
> discard_cleanups (bkpt_chain);
> /* But cleanup everything else. */
> do_cleanups (old_chain);
>
> /* error call may happen here - have BKPT_CHAIN already discarded. */
> update_global_location_list (1);
>
> return 1;
>
> So, we should make sure that install_breakpoint called in
> create_breakpoint doesn't call update_global_location_list(1), so that
> update_global_location_list can be deferred to call at the end of
> create_breakpoint.
>
> In this patch, we add a new parameter to determine to call
> update_global_location_list. We pass 0 to install_breakpoint when it is
> used in create_breakpoint and its callee.
Okay.
> * ada-lang.c (create_ada_exception_catchpoint):
> * breakpoint.c (install_breakpoint): Add one more parameter so that
> update_global_location_list is called conditionally.
> (create_fork_vfork_event_catchpoint): Update.
> (create_syscall_event_catchpoint): Update.
> (create_breakpoint_sal): Update.
> (create_breakpoint_sal): Update. Call do_cleanups before
> install_breakpoint.
> * breakpoint.h (install_breakpoint): Update declaration.
--
Pedro Alves
More information about the Gdb-patches
mailing list