From 73971819031d74eb846805a9fbfad04ba1dff500 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 10 Aug 2016 23:03:29 +0100 Subject: Plumb enum remove_bp_reason all the way to target_remove_breakpoint So the target knows whether we're detaching breakpoints. Nothing uses the parameter in this patch yet. gdb/ChangeLog: 2016-08-10 Pedro Alves PR gdb/19187 * break-catch-sig.c (signal_catchpoint_remove_location): Adjust interface. * break-catch-syscall.c (remove_catch_syscall): * breakpoint.c (enum remove_bp_reason): Moved to breakpoint.h. (remove_breakpoint_1): Pass 'reason' down. (remove_catch_fork, remove_catch_vfork, remove_catch_solib) (remove_catch_exec, remove_watchpoint, remove_masked_watchpoint) (base_breakpoint_remove_location, bkpt_remove_location) (bkpt_probe_remove_location, bkpt_probe_remove_location): Adjust interface. * breakpoint.h (enum remove_bp_reason): Moved here from breakpoint.c. (struct breakpoint_ops) : Add 'reason' parameter. * corelow.c (core_remove_breakpoint): New function. (init_core_ops): Install it as to_remove_breakpoint method. * exec.c (exec_remove_breakpoint): New function. (init_exec_ops): Install it as to_remove_breakpoint method. * mem-break.c (memory_remove_breakpoint): Adjust interface. * record-btrace.c (record_btrace_remove_breakpoint): Adjust interface. * record-full.c (record_full_remove_breakpoint) (record_full_core_remove_breakpoint): Adjust interface. * remote.c (remote_remove_breakpoint): Adjust interface. * target-debug.h (target_debug_print_enum_remove_bp_reason): New macro. * target-delegates.c: Regenerate. * target.c (target_remove_breakpoint): Add 'reason' parameter. * target.h (struct target_ops) : Add 'reason' parameter. (target_remove_breakpoint, memory_remove_breakpoint): Add 'reason' parameter. --- gdb/target-delegates.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gdb/target-delegates.c') diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 2887033..57e7939 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -262,24 +262,26 @@ debug_insert_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct b } static int -delegate_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2) +delegate_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2, enum remove_bp_reason arg3) { self = self->beneath; - return self->to_remove_breakpoint (self, arg1, arg2); + return self->to_remove_breakpoint (self, arg1, arg2, arg3); } static int -debug_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2) +debug_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2, enum remove_bp_reason arg3) { int result; fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_breakpoint (...)\n", debug_target.to_shortname); - result = debug_target.to_remove_breakpoint (&debug_target, arg1, arg2); + result = debug_target.to_remove_breakpoint (&debug_target, arg1, arg2, arg3); fprintf_unfiltered (gdb_stdlog, "<- %s->to_remove_breakpoint (", debug_target.to_shortname); target_debug_print_struct_target_ops_p (&debug_target); fputs_unfiltered (", ", gdb_stdlog); target_debug_print_struct_gdbarch_p (arg1); fputs_unfiltered (", ", gdb_stdlog); target_debug_print_struct_bp_target_info_p (arg2); + fputs_unfiltered (", ", gdb_stdlog); + target_debug_print_enum_remove_bp_reason (arg3); fputs_unfiltered (") = ", gdb_stdlog); target_debug_print_int (result); fputs_unfiltered ("\n", gdb_stdlog); -- cgit v1.1