summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2022-07-13 18:14:44 +0100
committerPeter Zhu <peter@peterzhu.ca>2022-08-18 13:25:32 -0400
commitb26aec9daa03a4f3da225e9e4f7a43e916928712 (patch)
treeb2002f074b354f743f701b28d3c080d2ec70f5f8 /misc
parenta4ef2f16728b4b1eb49cc3aded26219cabdfa7e7 (diff)
[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
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6129
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/lldb_cruby.py6
-rw-r--r--misc/lldb_rb/commands/command_template.py (renamed from misc/commands/command_template.py)5
-rw-r--r--misc/lldb_rb/commands/heap_page_command.py (renamed from misc/commands/heap_page_command.py)4
-rw-r--r--misc/lldb_rb/commands/rclass_ext_command.py (renamed from misc/commands/rclass_ext_command.py)2
-rw-r--r--misc/lldb_rb/constants.py (renamed from misc/constants.py)0
-rw-r--r--misc/lldb_rb/rb_base_command.py (renamed from misc/rb_base_command.py)0
6 files changed, 11 insertions, 6 deletions
diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py
index 6655d768ae..e30acffc40 100755
--- a/misc/lldb_cruby.py
+++ b/misc/lldb_cruby.py
@@ -15,7 +15,7 @@ import shlex
import platform
import glob
-from constants import *
+from lldb_rb.constants import *
# BEGIN FUNCTION STYLE DECLS
# 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__))
-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)
mname, _ = os.path.splitext(basename)
- exec(f"import commands.{mname}")
+ exec(f"import lldb_rb.commands.{mname}")
def __lldb_init_module(debugger, internal_dict):
# Register all classes that subclass RbBaseCommand
diff --git a/misc/commands/command_template.py b/misc/lldb_rb/commands/command_template.py
index bbc4b09157..843b66398f 100644
--- a/misc/commands/command_template.py
+++ b/misc/lldb_rb/commands/command_template.py
@@ -6,6 +6,11 @@
# 4. Ensure you are inheriting from RbBaseCommand or another command that
# 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
# globals and utility helpers
class TestCommand(RbBaseCommand):
diff --git a/misc/commands/heap_page_command.py b/misc/lldb_rb/commands/heap_page_command.py
index ee502a40b8..edb74a415b 100644
--- a/misc/commands/heap_page_command.py
+++ b/misc/lldb_rb/commands/heap_page_command.py
@@ -1,7 +1,7 @@
import lldb
-from constants import *
-from rb_base_command import RbBaseCommand
+from lldb_rb.constants import *
+from lldb_rb.rb_base_command import RbBaseCommand
class HeapPageCommand(RbBaseCommand):
program = "heap_page"
diff --git a/misc/commands/rclass_ext_command.py b/misc/lldb_rb/commands/rclass_ext_command.py
index 3d17f646bd..8bae911457 100644
--- a/misc/commands/rclass_ext_command.py
+++ b/misc/lldb_rb/commands/rclass_ext_command.py
@@ -1,4 +1,4 @@
-from rb_base_command import RbBaseCommand
+from lldb_rb.rb_base_command import RbBaseCommand
class RclassExtCommand(RbBaseCommand):
program = "rclass_ext"
diff --git a/misc/constants.py b/misc/lldb_rb/constants.py
index ec3050a399..ec3050a399 100644
--- a/misc/constants.py
+++ b/misc/lldb_rb/constants.py
diff --git a/misc/rb_base_command.py b/misc/lldb_rb/rb_base_command.py
index 44b2996d80..44b2996d80 100644
--- a/misc/rb_base_command.py
+++ b/misc/lldb_rb/rb_base_command.py