facebook / facebook/chisel

pproperties command needs ObjC runtime

オープン
#180 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
9.2k
フォーク
790
PR マージ指標
30日以内にマージされた PR はありません

説明

1.5.0

Was trying to use `pproperties`:

```python
(lldb) pproperties $imageView
error: error: unknown type name 'objc_property_t'
error: use of undeclared identifier 'objc_property_t'
error: expected expression
error: unknown type name 'objc_property_attribute_t'
error: use of undeclared identifier 'objc_property_attribute_t'
error: expected expression
error: error: unknown type name 'objc_property_t'
error: use of undeclared identifier 'objc_property_t'
error: expected expression
error: unknown type name 'objc_property_attribute_t'
error: use of undeclared identifier 'objc_property_attribute_t'
error: expected expression
Traceback (most recent call last):
File "/usr/local/opt/chisel/libexec/fblldb.py", line 83, in runCommand
command.run(args, options)
File "/usr/local/Cellar/chisel/1.5.0/libexec/commands/FBClassDump.py", line 69, in run
printProperties(cls)
File "/usr/local/Cellar/chisel/1.5.0/libexec/commands/FBClassDump.py", line 187, in printProperties
props = getProperties(cls)
File "/usr/local/Cellar/chisel/1.5.0/libexec/commands/FBClassDump.py", line 326, in getProperties
return [Property(m) for m in propsJson]
TypeError: 'NoneType' object is not iterable
```

After importing the ObjectiveC runtime:

```python
(lldb) e @import ObjectiveC.runtime;
(lldb) pproperties $imageView
error: error: no matching function for call to 'object_getClass'
candidate function not viable: no known conversion from 'long' to '__strong id' for 1st argument
error: error: use of undeclared identifier 'None'
Traceback (most recent call last):
File "/usr/local/opt/chisel/libexec/fblldb.py", line 83, in runCommand
command.run(args, options)
File "/usr/local/Cellar/chisel/1.5.0/libexec/commands/FBClassDump.py", line 67, in run
cls = getClassFromArgument(arguments[0], options.clsname)
File "/usr/local/Cellar/chisel/1.5.0/libexec/commands/FBClassDump.py", line 167, in getClassFromArgument
if not isClassObject(cls):
File "/usr/local/Cellar/chisel/1.5.0/libexec/commands/FBClassDump.py", line 156, in isClassObject
return runtimeHelpers.class_isMetaClass(runtimeHelpers.object_getClass(arg))
File "/usr/local/opt/chisel/libexec/fblldbobjcruntimehelpers.py", line 37, in class_isMetaClass
return fb.evaluateBooleanExpression(command)
File "/usr/local/opt/chisel/libexec/fblldbbase.py", line 84, in evaluateBooleanExpression
return (int(evaluateIntegerExpression('(BOOL)(' + expression + ')', printErrors)) != 0)
File "/usr/local/opt/chisel/libexec/fblldbbase.py", line 76, in evaluateIntegerExpression
output = evaluateExpression('(int)(' + expression + ')', printErrors).replace('\'', '')
AttributeError: 'NoneType' object has no attribute 'replace'
```

Not sure what else is wrong, but shouldn't `pproperties` import the runtime if it uses it?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。