* infrun.c (normal_stop, proceed): Remove call to print_sys_errmsg

when breakpoints fail. Move general breakpoint error messages to
	insert_breakpoints.
	* breakpoint.c (insert_breakpoints): Change warnings when
	breakpoints are nto inserted to specify the type. Remove call to
	memory_error when hardware breakpoints can't be inserted. Remove
	multiple calls to warning so all messages are sent to the user at
	once.
	(delete_breakpoints): Make insert error messsages more explicit.
This commit is contained in:
Grace Sainsbury
2002-08-23 20:49:38 +00:00
parent 0312286c94
commit 81d0cc192b
3 changed files with 110 additions and 46 deletions

View File

@@ -990,16 +990,9 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
trap_expected = 1;
else
{
int temp = insert_breakpoints ();
if (temp)
{
print_sys_errmsg ("insert_breakpoints", temp);
error ("Cannot insert breakpoints.\n\
The same program may be running in another process,\n\
or you may have requested too many hardware\n\
breakpoints and/or watchpoints.\n");
}
insert_breakpoints ();
/* If we get here there was no call to error() in
insert breakpoints -- so they were inserted. */
breakpoints_inserted = 1;
}
@@ -3379,16 +3372,6 @@ normal_stop (void)
if (target_has_execution && get_current_frame ())
(get_current_frame ())->pc = read_pc ();
if (breakpoints_failed)
{
target_terminal_ours_for_output ();
print_sys_errmsg ("While inserting breakpoints", breakpoints_failed);
printf_filtered ("Stopped; cannot insert breakpoints.\n\
The same program may be running in another process,\n\
or you may have requested too many hardware breakpoints\n\
and/or watchpoints.\n");
}
if (target_has_execution && breakpoints_inserted)
{
if (remove_breakpoints ())