static int
can_use_hardware_watchpoint PARAMS ((struct value *));
+static void break_at_finish_command PARAMS ((char *, int));
+static void break_at_finish_at_depth_command PARAMS ((char *, int));
+
void
tbreak_command PARAMS ((char *, int));
+static void tbreak_at_finish_command PARAMS ((char *, int));
+
static void
break_command_1 PARAMS ((char *, int, int));
static void do_enable_breakpoint PARAMS ((struct breakpoint *, enum bpdisp));
+static void create_solib_load_unload_event_breakpoint PARAMS ((char *hookname, int tempflag, char *dll_pathname, char *cond_string, enum bptype bp_kind));
+
+static void create_fork_vfork_event_catchpoint PARAMS ((int tempflag, char * cond_string, enum bptype bp_kind));
+
+static void break_at_finish_at_depth_command_1 PARAMS ((char *arg, int flag, int from_tty));
+
+static void break_at_finish_command_1 PARAMS ((char *arg, int flag, int from_tty));
+
+static void stop_command PARAMS ((char *arg, int from_tty));
+
+static void stopin_command PARAMS ((char *arg, int from_tty));
+
+static void stopat_command PARAMS ((char *arg, int from_tty));
+
+static char *ep_find_event_name_end PARAMS ((char *arg));
+
+static char *ep_parse_optional_if_clause PARAMS ((char **arg));
+
+static char *ep_parse_optional_filename PARAMS ((char **arg));
+
+static void catch_exec_command_1 PARAMS ((char *arg, int tempflag, int from_tty));
+
+static void create_exception_catchpoint PARAMS ((int tempflag, char *cond_string, enum exception_event_kind ex_event, struct symtab_and_line *sal));
+
+static void catch_exception_command_1 PARAMS ((enum exception_event_kind ex_event, char *arg, int tempflag, int from_tty));
+
+static void tcatch_command PARAMS ((char *arg, int from_tty));
+
+static void ep_skip_leading_whitespace PARAMS ((char **s));
+
/* Prototypes for exported functions. */
static void
case bp_catch_exec :
val = target_insert_exec_catchpoint (inferior_pid);
break;
+ default:
+ warning ("GDB bug: breakpoint.c (insert_breakpoints): enclosing `if' does not protect `switch'");
+ break;
}
if (val < 0)
{
case bp_catch_exec :
val = target_remove_exec_catchpoint (inferior_pid);
break;
+ default:
+ warning ("GDB bug: breakpoint.c (remove_breakpoint): enclosing `if' does not protect `switch'");
+ break;
}
if (val)
return val;
frame_in_dummy (frame)
struct frame_info *frame;
{
-#ifdef CALL_DUMMY
-#ifdef USE_GENERIC_DUMMY_FRAMES
- return generic_pc_in_call_dummy (frame->pc, frame->frame);
-#else
struct breakpoint *b;
+ if (! CALL_DUMMY_P)
+ return 0;
+
+ if (USE_GENERIC_DUMMY_FRAMES)
+ return generic_pc_in_call_dummy (frame->pc, frame->frame, frame->frame);
+
ALL_BREAKPOINTS (b)
{
- static ULONGEST dummy[] = CALL_DUMMY;
-
if (b->type == bp_call_dummy
&& b->frame == frame->frame
-
/* We need to check the PC as well as the frame on the sparc,
for signals.exp in the testsuite. */
&& (frame->pc
>= (b->address
- - sizeof (dummy) / sizeof (LONGEST) * REGISTER_SIZE))
+ - SIZEOF_CALL_DUMMY_WORDS / sizeof (LONGEST) * REGISTER_SIZE))
&& frame->pc <= b->address)
return 1;
}
-#endif /* GENERIC_DUMMY_FRAMES */
-#endif /* CALL_DUMMY */
return 0;
}
static char bpenables[] = "nyn";
char wrap_indent[80];
+
ALL_BREAKPOINTS (b)
if (bnum == -1
|| bnum == b->number)
while (l)
{
- print_command_line (l, 4);
+ print_command_line (l, 4, gdb_stdout);
l = l->next;
}
}
breakpoint_1 (bnum, 0);
}
-#if MAINTENANCE_CMDS
-
/* ARGSUSED */
-void
+static void
maintenance_info_breakpoints (bnum_exp, from_tty)
char *bnum_exp;
int from_tty;
breakpoint_1 (bnum, 1);
}
-#endif
-
/* Print a message describing any breakpoints set at PC. */
static void
static void
create_solib_load_unload_event_breakpoint (hookname, tempflag, dll_pathname, cond_string, bp_kind)
- char * hookname;
- int tempflag;
- char * dll_pathname;
- char * cond_string;
- enum bptype bp_kind;
+ char *hookname;
+ int tempflag;
+ char *dll_pathname;
+ char *cond_string;
+ enum bptype bp_kind;
{
struct breakpoint * b;
struct symtabs_and_lines sals;
static void
create_fork_vfork_event_catchpoint (tempflag, cond_string, bp_kind)
- int tempflag;
- char * cond_string;
- enum bptype bp_kind;
+ int tempflag;
+ char *cond_string;
+ enum bptype bp_kind;
{
struct symtab_and_line sal;
struct breakpoint * b;
break_command_1 (arg, 0, from_tty);
}
-void
+static void
break_at_finish_command (arg, from_tty)
char *arg;
int from_tty;
break_at_finish_command_1 (arg, 0, from_tty);
}
-void
+static void
break_at_finish_at_depth_command (arg, from_tty)
char *arg;
int from_tty;
break_command_1 (arg, BP_TEMPFLAG, from_tty);
}
-void
+static void
tbreak_at_finish_command (arg, from_tty)
char *arg;
int from_tty;
struct symtab_and_line sal;
};
+#if 0
/* Not really used -- invocation in handle_gnu_4_16_catch_command
had been commented out in the v.4.16 sources, and stays
disabled there now because "catch NAME" syntax isn't allowed.
while (*p == ' ' || *p == '\t') p++;
}
}
+#endif
/* This shares a lot of code with `print_frame_label_vars' from stack.c. */
static void
ep_skip_leading_whitespace (s)
- char ** s;
+ char **s;
{
if ((s == NULL) || (*s == NULL))
return;
the token is returned. Else, NULL is returned. */
static char *
ep_find_event_name_end (arg)
- char * arg;
+ char *arg;
{
char * s = arg;
char * event_name_end = NULL;
if clause in the arg string. */
static char *
ep_parse_optional_if_clause (arg)
- char ** arg;
+ char **arg;
{
char * cond_string;
future access should copy it to their own buffers. */
static char *
ep_parse_optional_filename (arg)
- char ** arg;
+ char **arg;
{
static char filename [1024];
char * arg_p = *arg;
typedef enum {catch_fork, catch_vfork} catch_fork_kind;
+static void catch_fork_command_1 PARAMS ((catch_fork_kind fork_kind, char *arg, int tempflag, int from_tty));
+
static void
catch_fork_command_1 (fork_kind, arg, tempflag, from_tty)
- catch_fork_kind fork_kind;
- char * arg;
- int tempflag;
- int from_tty;
+ catch_fork_kind fork_kind;
+ char *arg;
+ int tempflag;
+ int from_tty;
{
char * cond_string = NULL;
static void
catch_exec_command_1 (arg, tempflag, from_tty)
- char * arg;
- int tempflag;
- int from_tty;
+ char *arg;
+ int tempflag;
+ int from_tty;
{
char * cond_string = NULL;
static void
create_exception_catchpoint (tempflag, cond_string, ex_event, sal)
- int tempflag;
- char * cond_string;
- enum exception_event_kind ex_event;
- struct symtab_and_line * sal;
+ int tempflag;
+ char *cond_string;
+ enum exception_event_kind ex_event;
+ struct symtab_and_line *sal;
{
struct breakpoint * b;
int i;
static void
catch_exception_command_1 (ex_event, arg, tempflag, from_tty)
- enum exception_event_kind ex_event;
- char * arg;
- int tempflag;
- int from_tty;
+ enum exception_event_kind ex_event;
+ char *arg;
+ int tempflag;
+ int from_tty;
{
char * cond_string = NULL;
struct symtab_and_line * sal = NULL;
Convenience variable \"$bpnum\" contains the number of the last\n\
breakpoint set.", NULL));
-#if MAINTENANCE_CMDS
-
add_cmd ("breakpoints", class_maintenance, maintenance_info_breakpoints,
concat ("Status of all breakpoints, or breakpoint number NUMBER.\n\
The \"Type\" column indicates one of:\n\
breakpoint set.", NULL),
&maintenanceinfolist);
-#endif /* MAINTENANCE_CMDS */
-
add_com ("catch", class_breakpoint, catch_command,
"Set catchpoints to catch events.\n\
Raised signals may be caught:\n\