On Wed, Apr 24, 2013 at 1:13 AM, Keith Seitz wrote: > On 04/23/2013 08:44 AM, Hui Zhu wrote: >> >> --- a/gdb/breakpoint.c >> +++ b/gdb/breakpoint.c >> +/* Implement the "after_cond" breakpoint_ops method for dprintf. */ >> + >> +static void >> +dprintf_after_cond (struct bpstats *bs) >> +{ >> + bpstat tmp; >> + >> + bs->stop = 0; >> + bs->print = 0; >> + bs->commands = b->commands; >> + tmp = bs->next; >> + bs->next = tmp; >> + incref_counted_command_line (bs->commands); >> + bpstat_do_actions_1 (&bs); >> + bs->next = tmp; >> +} > > > This function must be incomplete. What is 'tmp' for? It is superfluous as > written. 'b' is undefined, too. > > Keith Oops, I post a wrong patch. This is the new one. Sorry for that. Thanks, Hui 2013-04-23 Yao Qi Hui Zhu PR gdb/15075 * breakpoint.c (bpstat_stop_status): Call b->ops->after_cond. (update_dprintf_command_list): Don't append "continue" command to the command of dprintf breakpoint. (base_breakpoint_after_cond): New. (base_breakpoint_ops): Add base_breakpoint_after_cond. (dprintf_after_cond): New. (initialize_breakpoint_ops): Set dprintf_after_cond. * breakpoint.h (breakpoint_ops): Add after_cond. 2013-04-23 Hui Zhu PR gdb/15075 * gdb.base/dprintf.exp: Remove "continue" from "info breakpoint" test.