blob: bbc4b09157ac4649bd2455c1ba069e4d853af84f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# This is a command template for implementing a helper function inside LLDB. To
# use this file
# 1. Copy it and rename the copy so it ends with `_command.py`.
# 2. Rename the class to something descriptive that ends with Command.
# 3. Change the program variable to be a descriptive command name
# 4. Ensure you are inheriting from RbBaseCommand or another command that
# implements the same interfact
# This test command inherits from RbBaseCommand which provides access to Ruby
# globals and utility helpers
class TestCommand(RbBaseCommand):
# program is the keyword the user will type in lldb to execute this command
program = "test"
# help_string will be displayed in lldb when the user uses the help functions
help_string = "This is a test command to show how to implement lldb commands"
# call is where our command logic will be implemented
def call(self, debugger, command, exe_ctx, result):
# This method will be called once the LLDB environment has been setup.
# You will have access to self.target, self.process, self.frame, and
# self.thread
#
# This is where we should implement our command logic
pass
|