#include "top.h"
#include "wrapper.h"
-#include "gdb-events.h"
#include "mi/mi-common.h"
/* Prototypes for local functions. */
-static void until_break_command_continuation (struct continuation_arg *arg,
- int error);
-
static void catch_command_1 (char *, int, int);
static void enable_delete_command (char *, int);
}
}
breakpoints_changed ();
- breakpoint_modify_event (b->number);
+ observer_notify_breakpoint_modified (b->number);
return;
}
free_command_lines (&b->commands);
b->commands = l;
breakpoints_changed ();
- breakpoint_modify_event (b->number);
+ observer_notify_breakpoint_modified (b->number);
return;
}
error (_("No breakpoint number %d."), bnum);
list after it finishes execution. */
b->commands = copy_command_lines (cmd->body_list[0]);
breakpoints_changed ();
- breakpoint_modify_event (b->number);
+ observer_notify_breakpoint_modified (b->number);
return simple_control;
}
error (_("No breakpoint number %d."), bnum);
/* If we've gotten confused in the unwinder, we might have
returned a frame that can't describe this variable. */
if (within_current_scope
- && block_function (b->exp_valid_block) != get_frame_function (fr))
+ && (block_linkage_function (b->exp_valid_block)
+ != get_frame_function (fr)))
within_current_scope = 0;
/* in_function_epilogue_p() returns a non-zero value if we're still
been done for deprecated_delete_breakpoint_hook and so on. */
if (deprecated_create_breakpoint_hook)
deprecated_create_breakpoint_hook (b);
- breakpoint_create_event (b->number);
+ observer_notify_breakpoint_created (b->number);
if (b->ops != NULL && b->ops->print_mention != NULL)
b->ops->print_mention (b);
bv = blockvector_for_pc_sect (sal->pc, 0, &b, sal->symtab);
if (bv != NULL)
{
- sym = block_function (b);
+ sym = block_linkage_function (b);
if (sym != NULL)
{
fixup_symbol_section (sym, sal->symtab->objfile);
/* Helper routines for the until_command routine in infcmd.c. Here
because it uses the mechanisms of breakpoints. */
+struct until_break_command_continuation_args
+{
+ struct breakpoint *breakpoint;
+ struct breakpoint *breakpoint2;
+};
+
/* This function is called by fetch_inferior_event via the
cmd_continuation pointer, to complete the until command. It takes
care of cleaning up the temporary breakpoints set up by the until
command. */
static void
-until_break_command_continuation (struct continuation_arg *arg, int error)
+until_break_command_continuation (void *arg)
{
- delete_breakpoint ((struct breakpoint *)(arg->data.pointer));
- if (arg->next)
- delete_breakpoint ((struct breakpoint *)(arg->next->data.pointer));
+ struct until_break_command_continuation_args *a = arg;
+
+ delete_breakpoint (a->breakpoint);
+ if (a->breakpoint2)
+ delete_breakpoint (a->breakpoint2);
}
void
struct breakpoint *breakpoint;
struct breakpoint *breakpoint2 = NULL;
struct cleanup *old_chain;
- struct continuation_arg *arg1;
- struct continuation_arg *arg2;
-
clear_proceed_status ();
if (target_can_async_p () && is_running (inferior_ptid))
{
- arg1 =
- (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
- arg1->next = NULL;
- arg1->data.pointer = breakpoint;
+ struct until_break_command_continuation_args *args;
+ args = xmalloc (sizeof (*args));
- if (breakpoint2)
- {
- arg2 = (struct continuation_arg *)
- xmalloc ( sizeof (struct continuation_arg));
- arg2->next = NULL;
- arg2->data.pointer = breakpoint2;
- arg1->next = arg2;
- }
+ args->breakpoint = breakpoint;
+ args->breakpoint2 = breakpoint2;
discard_cleanups (old_chain);
- add_continuation (until_break_command_continuation, arg1);
+ add_continuation (until_break_command_continuation, args,
+ xfree);
}
else
do_cleanups (old_chain);
if (deprecated_delete_breakpoint_hook)
deprecated_delete_breakpoint_hook (bpt);
- breakpoint_delete_event (bpt->number);
+ observer_notify_breakpoint_deleted (bpt->number);
if (breakpoint_chain == bpt)
breakpoint_chain = bpt->next;
count, bptnum);
}
breakpoints_changed ();
- breakpoint_modify_event (b->number);
+ observer_notify_breakpoint_modified (b->number);
return;
}
if (deprecated_modify_breakpoint_hook)
deprecated_modify_breakpoint_hook (bpt);
- breakpoint_modify_event (bpt->number);
+ observer_notify_breakpoint_modified (bpt->number);
}
static void
if (deprecated_modify_breakpoint_hook)
deprecated_modify_breakpoint_hook (bpt);
- breakpoint_modify_event (bpt->number);
+ observer_notify_breakpoint_modified (bpt->number);
}