+2007-11-30 Vladimir Prus <vladimir@codesourcery.com>
+
+ Make insert_breakpoints return void.
+ * breakpoint.h (insert_breakpoints): Change
+ return type to void.
+ * breakpoint.c (insert_breakpoints): Change
+ return type to void. Rename local return_val
+ variable to error.
+ * infrun.c (keep_going): Instead of checking
+ return value from insert_breakpoints, catch exception.
+
2007-11-29 Vladimir Prus <vladimir@codesourcery.com>
Stop infrun from tracking breakpoint insertion status.
Both return zero if successful,
or an `errno' value if could not write the inferior. */
-int
+void
insert_breakpoints (void)
{
struct bp_location *b, *temp;
- int return_val = 0; /* return success code. */
+ int error = 0;
int val = 0;
int disabled_breaks = 0;
int hw_breakpoint_error = 0;
&disabled_breaks, &process_warning,
&hw_breakpoint_error);
if (val)
- return_val = val;
+ error = val;
}
- if (return_val)
+ if (error)
{
/* If a hardware breakpoint or watchpoint was inserted, add a
message about possibly exhausted resources. */
target_terminal_ours_for_output ();
error_stream (tmp_error_stream);
}
- return return_val;
}
int
extern void rwatch_command_wrapper (char *, int);
extern void tbreak_command (char *, int);
-extern int insert_breakpoints (void);
+extern void insert_breakpoints (void);
extern int remove_breakpoints (void);
if (!ecs->another_trap)
{
+ struct gdb_exception e;
/* Stop stepping when inserting breakpoints
has failed. */
- if (insert_breakpoints () != 0)
+ TRY_CATCH (e, RETURN_MASK_ERROR)
+ {
+ insert_breakpoints ();
+ }
+ if (e.reason < 0)
{
stop_stepping (ecs);
return;