This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] bpstat_do_actions in one place
On Tue, May 06, 2008 at 06:14:44AM +0300, Eli Zaretskii wrote:
> > Date: Mon, 5 May 2008 15:41:30 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: vladimir@codesourcery.com, gdb-patches@sources.redhat.com
> >
> > I wasn't worried about embedding the q in the breakpoint commands
> > list, but about what effect it has when the prompt is triggered by
> > a command in the breakpoint command list. Basically, how far up
> > the call stack is considered "the remaining output"? Since what
> > it actually does is abort the command, not just discard the output.
>
> Okay, but is there a real problem here? That is, can the user really
> do something like that from inside breakpoint commands? I think it's
> not possible, since `q' is not a command. Am I right? If not, please
> show an example of doing this from breakpoint commands, because I
> cannot imagine a use case.
Here's the example from upthread with more detail.
int foo()
{
while (1)
/* Nothing on line 4 */ ;
}
int main() { foo (); }
(gdb) break 4
(gdb) commands
> backtrace
> continue
> end
This loop is tricky to interrupt. But I see now that the entire
commands list will still be interrupted by quit so we will not execute
the continue.
--
Daniel Jacobowitz
CodeSourcery