jingham added a comment.

This all looks fine except I'm not sure you can have a single override context. 
 The lldb command line is only a bit recursive, but you can have sequences like:

(lldb) command source file_that_contains_a_step

>>> Step hits a breakpoint which has commands

  One of those commands is a Python command that calls 
SBCommandInterpreter::HandleCommandsFromFile - passing in some other 
SBExecutionContext

IIUC, running the breakpoint command will push one override before running the 
command.  Then HandleCommandsFromFile will push another, and you'll won't get 
back to the first one.

And one of the weaknesses of lldb right now is that commands can't nest as well 
as they should.  For instance, you really should be able to hit a breakpoint, 
and have the breakpoint command able to do a couple of next's of whatever, even 
though the weakness of the lldb command interpreter precludes that at present.

So both for somewhat esoteric reasons like that above, and to future proof this 
change, I think you have to use a stack for the overrides/restore, not a single 
element.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92164/new/

https://reviews.llvm.org/D92164

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to