|
|
|
|
@ -13,6 +13,38 @@ from typing import Tuple
|
|
|
|
|
dbg: Debugger = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Frame:
|
|
|
|
|
def evaluate_expression(self, expression: str) -> Value:
|
|
|
|
|
"""
|
|
|
|
|
Evaluate the given expression in the context of this frame, and
|
|
|
|
|
return a `Value`.
|
|
|
|
|
"""
|
|
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Thread:
|
|
|
|
|
def bottom_frame(self) -> Frame:
|
|
|
|
|
"""
|
|
|
|
|
Frame at the bottom of the call stack for this thread.
|
|
|
|
|
"""
|
|
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Process:
|
|
|
|
|
def threads(self) -> List[Thread]:
|
|
|
|
|
"""
|
|
|
|
|
Returns a list containing the threads in this process.
|
|
|
|
|
"""
|
|
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
|
|
def evaluate_expression(self, expression: str) -> Value:
|
|
|
|
|
"""
|
|
|
|
|
Evaluate the given expression in the context of the current process, and
|
|
|
|
|
return a `Value`.
|
|
|
|
|
"""
|
|
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TypeCode(Enum):
|
|
|
|
|
"""
|
|
|
|
|
Broad categories of types.
|
|
|
|
|
@ -228,6 +260,24 @@ class Debugger:
|
|
|
|
|
"""
|
|
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
|
|
def selected_inferior(self) -> Process | None:
|
|
|
|
|
"""
|
|
|
|
|
The inferior process currently being focused on in this interactive session.
|
|
|
|
|
"""
|
|
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
|
|
def selected_thread(self) -> Thread | None:
|
|
|
|
|
"""
|
|
|
|
|
The thread currently being focused on in this interactive session.
|
|
|
|
|
"""
|
|
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
|
|
def selected_frame(self) -> Frame | None:
|
|
|
|
|
"""
|
|
|
|
|
The stack frame currently being focused on in this interactive session.
|
|
|
|
|
"""
|
|
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
|
|
def add_command(
|
|
|
|
|
self, name: str, handler: Callable[[Debugger, str, bool], None]
|
|
|
|
|
) -> CommandHandle:
|
|
|
|
|
@ -244,18 +294,6 @@ class Debugger:
|
|
|
|
|
# removed or replaced as the porting work continues.
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# This function will be split up into a frame-context and a global-context
|
|
|
|
|
# versions very soon, in a way that properly represents the way evaluation
|
|
|
|
|
# works under both GDB and LLDB.
|
|
|
|
|
#
|
|
|
|
|
# TODO: Split up `evaluate_expressions` into its global and local versions.
|
|
|
|
|
def evaluate_expression(self, expression: str) -> Value:
|
|
|
|
|
"""
|
|
|
|
|
Evaluate the given expression in the context of the current frame, and
|
|
|
|
|
return a `Value`.
|
|
|
|
|
"""
|
|
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
|
|
def addrsz(self, address: Any) -> str:
|
|
|
|
|
"""
|
|
|
|
|
Format the given address value.
|
|
|
|
|
|