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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rubygems_plugin.rb +8 -6
  3. data/lib/setup +22 -21
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9061dee8d0a2dd085cb4d386832f26280b2f2f74014a16aa2b09a05956b2d3e4
4
- data.tar.gz: fc3c11b1244bef76ff9c48ba621c5e4906c9be02fb45c02b3f943ffad7b209c7
3
+ metadata.gz: b1ae2c9e819de8f9fe5a8a1e956680ca5c1c2fe17995f7a962e903f6768e04bf
4
+ data.tar.gz: 39865278b156b0f5dd383f3559bdb1b3bd8b02a00c28b2613d1b7ba40cc635b2
5
5
  SHA512:
6
- metadata.gz: 9de4aa3f75090d8350d2ef821783389cd726490c57b84a91d2a35411569e01297c47c8c7c3387b085875d480037132e5cbd0430b151e3738d5619ca415679823
7
- data.tar.gz: 23e612d8e5b98153b108536870cc34c9d775d1248b04c3cf02825d9c426ee04760c7f5674871d79a4da8b0e410ec89ece9d762f53d54170fe6668426f0da4d54
6
+ metadata.gz: 198d18eedbbfa051183379e28f07026e3782d91602d6e547a4c448a465da36864ab96e9e7181a302455fd4de823343cc28c0c1d2d9112cc609d1c48d155c3cfc
7
+ data.tar.gz: 19a91a2a0e1288f8ac57651dd19cc2f9d30b45ad922d7c32b3f0f05e0f863b424e9b86348279c69771e559019bae3d788a7cdcfa58886f06c6c2fa628cd0e572
@@ -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(0664,Lldb_init_path)
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.rename scriptPath+'/setup', Lldb_file_path
42
- File.chmod(0775,Lldb_file_path)
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:8
5
- print ("Usage:")#line:9
6
- print (" subclass superclass_name eg:subclass NSObject")#line:10
7
- pass #line:11
8
- def process (O0OO0O0O0OOO0OOO0 ):#line:13
9
- OO0000O00O0OO000O =r'''
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:@"'''+O0OO0O0O0OOO0OOO0 +'''"];
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:91
87
- O00000OO0000O00O0 =lldb .debugger .GetCommandInterpreter ()#line:93
88
- O0000O0O000000OOO =lldb .SBCommandReturnObject ()#line:94
89
- O00000OO0000O00O0 .HandleCommand ('expression -lobjc -O -- '+OO0000O00O0OO000O ,O0000O0O000000OOO )#line:96
90
- O0OOOO0O0OO0O0OOO =O0000O0O000000OOO .GetOutput ()#line:97
91
- O0OOO00OOOOOO0O0O =re .search ('error',O0OOOO0O0OO0O0OOO )#line:98
92
- print (O0000O0O000000OOO .GetError ())#line:99
93
- def helloworld (OO0O00O0O0O00OOOO ,OO000O00000O0OO0O ,OOO000OO00O0000OO ,OO0000O00OO0OO0OO ):#line:102
94
- if OO000O00000O0OO0O ==None or OO000O00000O0OO0O =='-h':#line:104
95
- help ()#line:105
96
- else :#line:106
97
- process (OO000O00000O0OO0O )#line:107
98
- def __OOOO0O0OO00O00O00 (O000O00O0O0OOOO0O ,OO0OO00OOO00O0OOO ):#line:110
99
- O000O00O0O0OOOO0O .HandleCommand ("command script add -f subclass_lldb.helloworld subclass")#line:111
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subclass_lldb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - ningyuan