10000 clean up NONEOS and MCU group by xwings · Pull Request #973 · qilingframework/qiling · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 3 commits into from
Nov 1, 2021
Merged

clean up NONEOS and MCU group #973

merged 3 commits into from
Nov 1, 2021

Conversation

xwings
Copy link
Member
@xwings xwings commented Nov 1, 2021

Checklist

Which kind of PR do you create?

  • This PR only contains minor fixes.
  • This PR contains major feature update.
  • This PR introduces a new function/api for Qiling Framework.

Coding convention?

  • The new code conforms to Qiling Framework naming convention.
  • The imports are arranged properly.
  • Essential comments are added.
  • The reference of the new code is pointed out.

Extra tests?

  • No extra tests are needed for this PR.
  • I have added enough tests for this PR.
  • Tests will be added after some discussion and review.

Changelog?

  • This PR doesn't need to update Changelog.
  • Changelog will be updated after some proper review.
  • Changelog has been updated in my PR.

Target branch?

  • The target branch is dev branch.

One last thing


@xwings xwings merged commit 73af577 into qilingframework:dev Nov 1, 2021


if self._code == None:
self._code = "qiling"
Copy link
Member

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
Copy link
Member

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):
Copy link
Member

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.
Copy link
Member

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 (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0