Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.82 diff -p -r1.82 breakpoint.c *** breakpoint.c 23 Aug 2002 20:49:38 -0000 1.82 --- breakpoint.c 23 Aug 2002 23:47:18 -0000 *************** top: *** 1927,1933 **** breakpoint_proceeded = 0; for (; bs != NULL; bs = bs->next) { ! cmd = bs->commands; while (cmd != NULL) { execute_control_command (cmd); --- 1927,1939 ---- breakpoint_proceeded = 0; for (; bs != NULL; bs = bs->next) { ! struct cleanup *copy_cleanup; ! ! /* Use a temporary copy of the commands, as one command in the list ! may cause this breakpoint and its commands to be deleted. */ ! cmd = copy_command_lines (bs->commands); ! copy_cleanup = make_cleanup_free_command_lines (&cmd); ! while (cmd != NULL) { execute_control_command (cmd); *************** top: *** 1945,1954 **** goto top; else bs->commands = NULL; - } ! executing_breakpoint_commands = 0; ! discard_cleanups (old_chain); } /* This is the normal print function for a bpstat. In the future, --- 1951,1960 ---- goto top; else bs->commands = NULL; ! do_cleanups (copy_cleanup); ! } ! do_cleanups (old_chain); } /* This is the normal print function for a bpstat. In the future,