+ bl = find_non_raw_software_breakpoint_inserted_here (aspace, address);
+
+ /* Only remove the raw breakpoint if there are no other non-raw
+ breakpoints still inserted at this location. Otherwise, we would
+ be effectively disabling those breakpoints. */
+ if (bl == NULL)
+ ret = target_remove_breakpoint (gdbarch, bp_tgt);
+ else if (!VEC_empty (agent_expr_p, bl->target_info.conditions)
+ || !VEC_empty (agent_expr_p, bl->target_info.tcommands))
+ {
+ /* The target is evaluating conditions, and when we inserted the
+ software single-step breakpoint, we had made the breakpoint
+ unconditional and command-less on the target side. Reinsert
+ to restore the conditions/commands. */
+ ret = target_insert_breakpoint (bl->gdbarch, &bl->target_info);
+ }
+ else
+ ret = 0;
+