[lldb/Plugin] Add artificial stackframe loading in ScriptedThread

This patch adds the ability for ScriptedThread to load artificial stack
frames. To do so, the interpreter instance can create a list that will
contain the frame index and its pc address.

Then, when the Scripted Process plugin stops, it will refresh its
Scripted Threads state by invalidating their register context and load
to list from the interpreter object and reconstruct each frame.

This patch also removes all of the default implementation for
`get_stackframes` from the derived ScriptedThread classes, and add the
interface code for the Scripted Thread Interface.

rdar://88721095

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
Med Ismail Bennani
2022-02-09 19:04:21 -08:00
parent c30742ba73
commit 7066584491
12 changed files with 102 additions and 49 deletions

View File

@@ -306,9 +306,9 @@ class ScriptedThread:
containing for each entry, the frame index, the canonical
frame address, the program counter value for that frame
and a symbol context.
None if the list is empty.
The list can be empty.
"""
return 0
return self.frames
def get_register_info(self):
if self.register_info is None: