This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: `step'-like commands in breakpoint commands list


> On m68k-motorola-sysv and on powerpc-ibm-aix4.1.5.0, with gdb-4.17.87,
> the testsuite fails at `continue in infrun_breakpoint_command_test', because
> the breakpoint commands list is only executed up to the first `step' command.
> The patch below fixes that.
...
> +#if 0 /* FIXME : Disabled 1999-04-12 by phdm@macqel.be, to allow `step',
> +	 `next', `finish', etc. to work in breakpoint commands list.  As
> +	 this is the only instruction that sets `breakpoint_proceeded',
> +	 all the `breakpoint_proceeded'-related stuff could also be removed.
> +	 */
>    breakpoint_proceeded = 1;	/* We're about to proceed... */
> +#endif

Is this patch safe?? What about the comment further down:

	/* The inferior is proceeded by the command; bomb out now.
	   The bpstat chain has been blown away by wait_for_inferior.
	   But since execution has stopped again, there is a new bpstat
	   to look at, so start over.  */

I should also note that due to the recursive implementation of
bpstat_do_actions(), it is probably not a good idea to allow
bpstat_do_action() calls to accumulate on the stack if the inferior
keeps hitting breakpoints that have command lists. Also, when you
request a Quit, then GDB forgets all that breakpoint command list
state, and behaves differently when you continue the inferior.

-- 
Todd Whitesel
toddpw @ wrs.com