+2011-04-04 Tom Tromey <tromey@redhat.com>
+
+ * breakpoint.c (struct captured_parse_breakpoint_args): Remove.
+ (do_captured_parse_breakpoint): Remove.
+ (create_breakpoint): `e' is now volatile. Remove `parse_args'.
+ Use TRY_CATCH directly.
+
2011-04-04 Tom Tromey <tromey@redhat.com>
* symtab.h (free_symtab): Remove.
delete_breakpoint (b);
}
-struct captured_parse_breakpoint_args
- {
- char **arg_p;
- struct symtabs_and_lines *sals_p;
- struct linespec_result *canonical_p;
- int *not_found_ptr;
- };
-
struct lang_and_radix
{
enum language lang;
}
}
-static void
-do_captured_parse_breakpoint (struct ui_out *ui, void *data)
-{
- struct captured_parse_breakpoint_args *args = data;
-
- parse_breakpoint_sals (args->arg_p, args->sals_p, args->canonical_p,
- args->not_found_ptr);
-}
-
/* Given TOK, a string specification of condition and thread, as
accepted by the 'break' command, extract the condition
string and thread number and set *COND_STRING and *THREAD.
struct breakpoint_ops *ops,
int from_tty, int enabled, int internal)
{
- struct gdb_exception e;
+ volatile struct gdb_exception e;
struct symtabs_and_lines sals;
struct symtab_and_line pending_sal;
char *copy_arg;
struct linespec_result canonical;
struct cleanup *old_chain;
struct cleanup *bkpt_chain = NULL;
- struct captured_parse_breakpoint_args parse_args;
int i;
int pending = 0;
int not_found = 0;
sals.nelts = 0;
init_linespec_result (&canonical);
- parse_args.arg_p = &arg;
- parse_args.sals_p = &sals;
- parse_args.canonical_p = &canonical;
- parse_args.not_found_ptr = ¬_found;
-
if (type_wanted == bp_static_tracepoint && is_marker_spec (arg))
{
int i;
goto done;
}
- e = catch_exception (uiout, do_captured_parse_breakpoint,
- &parse_args, RETURN_MASK_ALL);
+ TRY_CATCH (e, RETURN_MASK_ALL)
+ {
+ parse_breakpoint_sals (&arg, &sals, &canonical, ¬_found);
+ }
/* If caller is interested in rc value from parse, set value. */
switch (e.reason)