[all-commits] [llvm/llvm-project] 1130e9: [lldb/Interpreter] Discard ScriptedThreadPlan::Get...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Fri Jun 28 01:40:24 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1130e923e2d7fe046101bf639bc5ebcde194c005
      https://github.com/llvm/llvm-project/commit/1130e923e2d7fe046101bf639bc5ebcde194c005
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2024-06-28 (Fri, 28 Jun 2024)

  Changed paths:
    M lldb/include/lldb/Interpreter/Interfaces/ScriptedThreadPlanInterface.h
    M lldb/include/lldb/Interpreter/ScriptInterpreter.h
    M lldb/source/Interpreter/ScriptInterpreter.cpp
    M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp
    M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
    M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPlanPythonInterface.cpp
    M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPlanPythonInterface.h
    M lldb/source/Target/ThreadPlanPython.cpp
    M lldb/test/API/functionalities/step_scripted/TestStepScripted.py

  Log Message:
  -----------
  [lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return value (#96985)

This patch changes `ScriptedThreadPlan::GetStopDescription` behavior by
discarding its return value since it is optional in the first place (the
user doesn't need to provide a return value in their implementation).

This patch also addresses the test failures in TestStepScripted
following 9a9ec22 and re-enables the tests that were XFAIL'd previously.

The issue here was that the `Stream*` that's passed to
`ThreadPlanPython::GetDescription` wasn't being passed by reference to
the python method so it was never updated to reflect how the python
method interacted with it.

This patch solves this issue by making a temporary `StreamSP` that will
be passed to the python method by reference, after what we will copy its
content to the caller `Stream` pointer argument.

---------

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list