35 char *condition = NULL;
44 OPT_CONDITION, OPT_DISABLED, OPT_TEMP,
46 static const struct mi_opt opts[] =
48 {
"c", OPT_CONDITION, 1},
49 {
"d", OPT_DISABLED, 0 },
62 switch ((
enum opt) opt)
84 if (condition != NULL)
85 condition = xstrdup (condition);
87 NULL, condition, temp, enabled, 0);
96 char *condition = NULL;
98 char *exception_name = NULL;
107 OPT_CONDITION, OPT_DISABLED, OPT_EXCEPTION_NAME, OPT_TEMP,
110 static const struct mi_opt opts[] =
112 {
"c", OPT_CONDITION, 1},
113 {
"d", OPT_DISABLED, 0 },
114 {
"e", OPT_EXCEPTION_NAME, 1 },
115 {
"t", OPT_TEMP, 0 },
116 {
"u", OPT_UNHANDLED, 0},
128 switch ((
enum opt) opt)
136 case OPT_EXCEPTION_NAME:
137 exception_name = oarg;
151 error (
_(
"Invalid argument: %s"),
argv[oind]);
156 error (
_(
"\"-e\" and \"-u\" are mutually exclusive"));
161 if (exception_name != NULL)
162 exception_name = xstrdup (exception_name);
163 if (condition != NULL)
164 condition = xstrdup (condition);
166 exception_name, condition,
175 const char *actual_cmd = load ?
"-catch-load" :
"-catch-unload";
185 static const struct mi_opt opts[] =
187 {
"t", OPT_TEMP, 0 },
188 {
"d", OPT_DISABLED, 0 },
200 switch ((
enum opt) opt)
212 error (
_(
"-catch-load/unload: Missing <library name>"));
214 error (
_(
"-catch-load/unload: Garbage following the <library name>"));
int mi_getopt(const char *prefix, int argc, char **argv, const struct mi_opt *opts, int *oind, char **oarg)
void mi_cmd_catch_load(const char *cmd, char *argv[], int argc)
void create_ada_exception_catchpoint(struct gdbarch *gdbarch, enum ada_exception_catchpoint_kind ex_kind, char *excep_string, char *cond_string, int tempflag, int disabled, int from_tty)
scoped_restore_tmpl< int > setup_breakpoint_reporting(void)
struct gdbarch * get_current_arch(void)
void mi_cmd_catch_unload(const char *cmd, char *argv[], int argc)
static void mi_catch_load_unload(int load, char *argv[], int argc)
ada_exception_catchpoint_kind
void add_solib_catchpoint(const char *arg, int is_load, int is_temp, int enabled)
void mi_cmd_catch_exception(const char *cmd, char *argv[], int argc)
void error(const char *fmt,...)
void mi_cmd_catch_assert(const char *cmd, char *argv[], int argc)