rocallahan wrote:

> I worry that in a situation like this where there's a pending task people 
> will go the wrong way and lose important state because they forgot that 
> "continue" doesn't mean "continue what I was doing" - which is what it 
> currently means in lldb

I don't know of any other debugger that supports the equivalent of a thread 
plan stack, and even though I've been neck-deep in debuggers for a long time I 
didn't know about this LLDB feature until I started working on this PR, so TBH 
I think most users will assume "continue" works like any other debugger and 
just resumes execution forwards, and are surprised (hopefully in a good way) 
if/when they discover it's more complicated than that. And therefore will be 
surprised in a bad way if/when they discover that "continue" runs backwards in 
some situations.

> I think ultimately I'm arguing against requiring: "we either have all forward 
> or all backwards plans on any given thread plan stack" because I don't think 
> that is flexible enough to support all the use cases we want to support.

I agree and as I said above, I've already removed that requirement in my 
experimental branch. I haven't added a notion of "no-direction-opinion" plans 
yet, but most of what you said above makes sense even if we don't have that.

Let's consider a really simple case where the user does a reverse-continue, 
hits an unconditional breakpoint, and then wants to execute forwards. One 
question is, what command should they use to execute forwards? I've been 
assuming that they would just use `process continue`, but if you really want 
`process continue` to resume the reverse-continue and we should have a separate 
command or flag to switch to forwards, we can do that. We should probably 
settle this now because it's quite fundamental.

The other question is, what should the thread plan stacks look like during this 
scenario?

https://github.com/llvm/llvm-project/pull/112079
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to