This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH v2] dynamic printf
>>>>> "Stan" == Stan Shebs <firstname.lastname@example.org> writes:
Stan> Basically if you set bs->stop to 0, command lists don't get run. It's
Stan> a little convoluted, because the code does go into bpstat_do_actions,
Stan> but nothing happens there because the copy of b->commands to
Stan> bs-> commands in bpstat_stop_status only happens if bs->stop.
Stan> That's why I'm thinking of a special command / pseudo-command for the
Stan> command list; we don't necessarily want to say that we haven't
Stan> stopped, because that meaning is typically reserved for "yes we hit
Stan> the trap, but pretend it never happened".
I think this would be a good idea in the context of a wider examination
of other changes like this that are desirable or needed. It seems to me
that there are some other ones in bugzilla.
In this particular case, though, I think you could do it by just having
the 'printf' invocation not be 'commands' stuck onto a breakpoint, but
instead a per-dprintf method that is run at the appropriate moment, a la
the Python 'Breakpoint.stop' method.