1 """ Test command for checking the Python commands can run in a stop-hook """
8 def __init__(self
, debugger
, unused
):
11 def __call__(self
, debugger
, command
, exe_ctx
, result
):
14 result
.PutCString("some output\n")
16 def get_short_help(self
):
17 return "Test command - sets a variable."
21 def __init__(self
, debugger
, unused
):
24 def __call__(self
, debugger
, command
, exe_ctx
, result
):
27 result
.SetStatus(lldb
.eReturnStatusSuccessFinishNoResult
)
29 result
.SetStatus(lldb
.eReturnStatusFailed
)
31 def get_short_help(self
):
32 return "Test command - sets a variable."
35 def __lldb_init_module(debugger
, unused
):
36 print("Adding command some-cmd and report-cmd")
37 debugger
.HandleCommand("command script add -c some_cmd.SomeCommand some-cmd")
38 debugger
.HandleCommand("command script add -c some_cmd.OtherCommand report-cmd")