[all-commits] [llvm/llvm-project] 754ab8: [lldb] Use current execution context in SBDebugger

Andy Hippo via All-commits all-commits at lists.llvm.org
Mon Feb 1 04:13:12 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 754ab803b8dc659e3645d369d1b5d6d2f97be29e
      https://github.com/llvm/llvm-project/commit/754ab803b8dc659e3645d369d1b5d6d2f97be29e
  Author: Andy Yankovsky <werat at google.com>
  Date:   2021-02-01 (Mon, 01 Feb 2021)

  Changed paths:
    M lldb/source/API/SBDebugger.cpp
    M lldb/test/API/python_api/debugger/TestDebuggerAPI.py

  Log Message:
  -----------
  [lldb] Use current execution context in SBDebugger

Use `GetSelectedExecutionContext()` instead of
`GetCommandInterpreter().GetExecutionContext()` in
`SBDebugger::GetInternalVariableValue/SBDebugger::SetInternalVariable`. The
execution context in the command interpreter might be empty, if no commands has
been executed yet (it is updated only when handling commands or completions --
e.g.
https://github.com/llvm/llvm-project/blob/main/lldb/source/Interpreter/CommandInterpreter.cpp#L1855).

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D95761




More information about the All-commits mailing list