-
Notifications
You must be signed in to change notification settings - Fork 749
clean up NONEOS and MCU group #973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
|
||
if self._code == None: | ||
self._code = "qiling" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_code
is usually tested for None
to determine whether we are running a shellcode or not.
I am not sure why _code
is set here to some magic string, but I guess it would result in some unexpected behavior.
if self._argv is None: | ||
self._argv = ["qilingcode"] | ||
if self._rootfs is None: | ||
self._rootfs = "." | ||
|
||
|
||
self._interpreter = True if self._archtype in (QL_ARCH_INTERPRETER) else False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just self._archtype in (QL_ARCH_INTERPRETER)
will do.
It is already a boolean predicate.
return self._interpreter | ||
|
||
@interpreter.setter | ||
def interpreter(self, i): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this property be read-only?
What is the rationale in letting it be writeable?
(same goes for baremetal
)
@@ -629,6 +630,31 @@ def uc(self) -> Uc: | |||
def uc(self, u): | |||
self._uc = u | |||
|
|||
@property | |||
def interpreter(self) -> bool: | |||
""" Raw uc instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An unclear / wrong comment is worse than no comment (:
Checklist
Which kind of PR do you create?
Coding convention?
Extra tests?
Changelog?
Target branch?
One last thing