[Lldb-commits] [PATCH] D92164: Make SBDebugger internal variable getter and setter not use CommandInterpreter's context

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 30 16:52:49 PST 2020


jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

I don't see any reason for, and lots of reasons against having more than one source of truth for a Debugger's "Currently Selected ExecutionContext".  In particular, I can't see any good uses of the Debugger and the CommandInterpreter being able to have different "currently selected targets/threads/frames".  For instance, I think people would generally be surprised if calling SBDebugger.SetSelectedTarget didn't also change the default target that subsequent command interpreter commands use.

This patch solves the problem that the CommandInterpreter's version of this truth is out of sync with the Debugger's notion by ignoring the CommandInterpreter's version.  That seems to me the wrong way to solve the problem.

Rather, we should make sure that everyone is looking to the same source.  I'm not sure it makes sense for the CommandInterpreter to be the one holding the "Currently Selected Execution Context".  Maybe that should be kept in the Debugger, and the Command Interpreter could then call Debugger::GetSelectedExecutionContext?


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

https://reviews.llvm.org/D92164



More information about the lldb-commits mailing list