Skip to content

system_calls: add reverse syscall lookup (number -> name) #127

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

laomaiweng
Copy link

Title says it all, this PR just adds reverse lookup to get a syscall name by its number.
Like for regular lookup, the reverse lookup table is built dynamically if needed, and cached.
The __getitem__ operator is overloaded to support both forward lookup if the key is a string, and reverse lookup if the key is a number.

Whether or not you merge this, thanks for this very useful project!

@hrw
Copy link
Owner

hrw commented Jul 30, 2025

Wow, someone is using this Python code!

Thanks for new functionality. Will review after summer holidays.

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