[ci-skip][Feature #18910][lldb] New directory structure
Push the newly refactored lldb files into a sub-directory so that we're not cluttering up the misc directory
This commit is contained in:
parent
a4ef2f1672
commit
b26aec9daa
Notes:
git
2022-08-19 02:26:11 +09:00
@ -15,7 +15,7 @@ import shlex
|
|||||||
import platform
|
import platform
|
||||||
import glob
|
import glob
|
||||||
|
|
||||||
from constants import *
|
from lldb_rb.constants import *
|
||||||
|
|
||||||
# BEGIN FUNCTION STYLE DECLS
|
# BEGIN FUNCTION STYLE DECLS
|
||||||
# This will be refactored to use class style decls in the misc/commands dir
|
# This will be refactored to use class style decls in the misc/commands dir
|
||||||
@ -716,11 +716,11 @@ def rb_id2str(debugger, command, result, internal_dict):
|
|||||||
|
|
||||||
load_dir, _ = os.path.split(os.path.realpath(__file__))
|
load_dir, _ = os.path.split(os.path.realpath(__file__))
|
||||||
|
|
||||||
for fname in glob.glob(f"{load_dir}/commands/*_command.py"):
|
for fname in glob.glob(f"{load_dir}/lldb_rb/commands/*_command.py"):
|
||||||
_, basename = os.path.split(fname)
|
_, basename = os.path.split(fname)
|
||||||
mname, _ = os.path.splitext(basename)
|
mname, _ = os.path.splitext(basename)
|
||||||
|
|
||||||
exec(f"import commands.{mname}")
|
exec(f"import lldb_rb.commands.{mname}")
|
||||||
|
|
||||||
def __lldb_init_module(debugger, internal_dict):
|
def __lldb_init_module(debugger, internal_dict):
|
||||||
# Register all classes that subclass RbBaseCommand
|
# Register all classes that subclass RbBaseCommand
|
||||||
|
@ -6,6 +6,11 @@
|
|||||||
# 4. Ensure you are inheriting from RbBaseCommand or another command that
|
# 4. Ensure you are inheriting from RbBaseCommand or another command that
|
||||||
# implements the same interfact
|
# implements the same interfact
|
||||||
|
|
||||||
|
import lldb
|
||||||
|
|
||||||
|
from lldb_rb.constants import *
|
||||||
|
from lldb_rb.rb_base_command import RbBaseCommand
|
||||||
|
|
||||||
# This test command inherits from RbBaseCommand which provides access to Ruby
|
# This test command inherits from RbBaseCommand which provides access to Ruby
|
||||||
# globals and utility helpers
|
# globals and utility helpers
|
||||||
class TestCommand(RbBaseCommand):
|
class TestCommand(RbBaseCommand):
|
@ -1,7 +1,7 @@
|
|||||||
import lldb
|
import lldb
|
||||||
|
|
||||||
from constants import *
|
from lldb_rb.constants import *
|
||||||
from rb_base_command import RbBaseCommand
|
from lldb_rb.rb_base_command import RbBaseCommand
|
||||||
|
|
||||||
class HeapPageCommand(RbBaseCommand):
|
class HeapPageCommand(RbBaseCommand):
|
||||||
program = "heap_page"
|
program = "heap_page"
|
@ -1,4 +1,4 @@
|
|||||||
from rb_base_command import RbBaseCommand
|
from lldb_rb.rb_base_command import RbBaseCommand
|
||||||
|
|
||||||
class RclassExtCommand(RbBaseCommand):
|
class RclassExtCommand(RbBaseCommand):
|
||||||
program = "rclass_ext"
|
program = "rclass_ext"
|
Loading…
x
Reference in New Issue
Block a user