[lldb/Plugins] Refactor ScriptedThread register context creation
authorMed Ismail Bennani <medismail.bennani@gmail.com>
Wed, 10 Nov 2021 19:53:14 +0000 (19:53 +0000)
committerMed Ismail Bennani <medismail.bennani@gmail.com>
Wed, 10 Nov 2021 23:13:58 +0000 (00:13 +0100)
commit676576b6f027516c8ea1b45f6da3cd1b94a851a2
treebf793350689eec435a03d64316fdafd5d9bef334
parentfddc4e41164e2fd152605362639eb3255cc75212
[lldb/Plugins] Refactor ScriptedThread register context creation

This patch changes the ScriptedThread class to create the register
context when Process::RefreshStateAfterStop is called rather than
doing it in the thread constructor.

This is required to update the thread state for execution control.

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
lldb/source/Plugins/Process/scripted/ScriptedProcess.h
lldb/source/Plugins/Process/scripted/ScriptedThread.cpp