subclass_lldb 0.0.9 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubygems_plugin.rb +8 -6
- data/lib/setup +22 -21
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1ae2c9e819de8f9fe5a8a1e956680ca5c1c2fe17995f7a962e903f6768e04bf
|
4
|
+
data.tar.gz: 39865278b156b0f5dd383f3559bdb1b3bd8b02a00c28b2613d1b7ba40cc635b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 198d18eedbbfa051183379e28f07026e3782d91602d6e547a4c448a465da36864ab96e9e7181a302455fd4de823343cc28c0c1d2d9112cc609d1c48d155c3cfc
|
7
|
+
data.tar.gz: 19a91a2a0e1288f8ac57651dd19cc2f9d30b45ad922d7c32b3f0f05e0f863b424e9b86348279c69771e559019bae3d788a7cdcfa58886f06c6c2fa628cd0e572
|
data/lib/rubygems_plugin.rb
CHANGED
@@ -7,8 +7,7 @@ Lldb_source_path = File.expand_path('~')+'/.subclass_lldb'
|
|
7
7
|
Lldb_file_path = File.expand_path('~')+'/.subclass_lldb/subclass_lldb.py'
|
8
8
|
Commond_str = 'command script import '+Lldb_file_path
|
9
9
|
|
10
|
-
Gem.post_install do
|
11
|
-
|
10
|
+
Gem.post_install do |installer|
|
12
11
|
# 配置 .lldbinit
|
13
12
|
if File.exist?(Lldb_init_path)
|
14
13
|
f=File.new(Lldb_init_path,"a+")
|
@@ -30,16 +29,19 @@ Gem.post_install do
|
|
30
29
|
f.puts Commond_str
|
31
30
|
f.close
|
32
31
|
end
|
33
|
-
File.chmod(
|
32
|
+
File.chmod(0775,Lldb_init_path)
|
34
33
|
|
35
|
-
# 配置执行脚本
|
36
34
|
if !File.exist?(Lldb_source_path)
|
37
35
|
Dir.mkdir(Lldb_source_path)
|
38
36
|
end
|
37
|
+
|
39
38
|
File.chmod(0775,Lldb_source_path)
|
39
|
+
|
40
40
|
scriptPath = File.dirname(Pathname.new(__FILE__).realpath)
|
41
|
-
File.
|
42
|
-
|
41
|
+
if File.exist?(scriptPath+'/setup')
|
42
|
+
File.rename scriptPath+'/setup', Lldb_file_path
|
43
|
+
File.chmod(0775,Lldb_file_path)
|
44
|
+
end
|
43
45
|
|
44
46
|
puts "Please use the subclass command in your Xcode LLDB."
|
45
47
|
end
|
data/lib/setup
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# !/usr/bin/env python3
|
2
2
|
import lldb #line:5
|
3
3
|
import re #line:6
|
4
|
-
def help ():#line:
|
5
|
-
print ("Usage:")#line:
|
6
|
-
print (" subclass superclass_name eg:subclass NSObject")#line:
|
7
|
-
pass #line:
|
8
|
-
def process (
|
9
|
-
|
4
|
+
def help ():#line:50
|
5
|
+
print ("Usage:")#line:51
|
6
|
+
print (" subclass superclass_name eg:subclass NSObject")#line:52
|
7
|
+
pass #line:53
|
8
|
+
def process (OOOOOO0O00O0OO00O ):#line:55
|
9
|
+
OOO00OO000OO00OO0 =r'''
|
10
10
|
@import <dlfcn.h>;
|
11
11
|
@import <objc/runtime.h>;
|
12
12
|
@import Foundation;
|
@@ -22,7 +22,7 @@ def process (O0OO0O0O0OOO0OOO0 ):#line:13
|
|
22
22
|
NSInteger backLevel = 0;//继承层级
|
23
23
|
NSMutableDictionary * visited_class = [[NSMutableDictionary alloc]init];
|
24
24
|
NSMutableArray * class_stack = [[NSMutableArray alloc] init];
|
25
|
-
[class_stack addObject:@"'''+
|
25
|
+
[class_stack addObject:@"'''+OOOOOO0O00O0OO00O +'''"];
|
26
26
|
BOOL isPrint = NO;
|
27
27
|
printf("\\n");
|
28
28
|
while (true) {
|
@@ -83,17 +83,18 @@ def process (O0OO0O0O0OOO0OOO0 ):#line:13
|
|
83
83
|
break;
|
84
84
|
}
|
85
85
|
}
|
86
|
-
'''#line:
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
print (
|
93
|
-
def helloworld (
|
94
|
-
if
|
95
|
-
help ()#line:
|
96
|
-
else :#line:
|
97
|
-
process (
|
98
|
-
def
|
99
|
-
|
86
|
+
'''#line:133
|
87
|
+
OO00OOOO00OOO0000 =lldb .debugger .GetCommandInterpreter ()#line:135
|
88
|
+
OO00000OOO0OOOO00 =lldb .SBCommandReturnObject ()#line:136
|
89
|
+
OO00OOOO00OOO0000 .HandleCommand ('expression -lobjc -O -- '+OOO00OO000OO00OO0 ,OO00000OOO0OOOO00 )#line:138
|
90
|
+
OOO0O00OOOO0OO0OO =OO00000OOO0OOOO00 .GetOutput ()#line:139
|
91
|
+
OO000000O0O000O0O =re .search ('error',OOO0O00OOOO0OO0OO )#line:140
|
92
|
+
print (OO00000OOO0OOOO00 .GetError ())#line:141
|
93
|
+
def helloworld (O00O0OOO00O0O000O ,O0OO0OOOO00OO0O00 ,OOOOO0OOO0OO00OOO ,OOOO00000OO0O0000 ):#line:144
|
94
|
+
if O0OO0OOOO00OO0O00 ==None or O0OO0OOOO00OO0O00 =='-h':#line:146
|
95
|
+
help ()#line:147
|
96
|
+
else :#line:148
|
97
|
+
process (O0OO0OOOO00OO0O00 )#line:149
|
98
|
+
def __O00OO0O0OO00O0O00 (OOO00OO00000OOO00 ,OOO0OOO0OO0000000 ):#line:152
|
99
|
+
print ("__lldb_init_module")#line:153
|
100
|
+
OOO00OO00000OOO00 .HandleCommand ("command script add -f subclass_lldb.helloworld subclass")#line:155
|