Skip to content

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

Merged
hrw merged 1 commit intohrw:masterfrom
laomaiweng:feature/reverse-lookup
Sep 1, 2025
Merged

system_calls: add reverse syscall lookup (number -> name)#127
hrw merged 1 commit intohrw:masterfrom
laomaiweng:feature/reverse-lookup

Conversation

@laomaiweng
Copy link
Contributor

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.

@laomaiweng laomaiweng force-pushed the feature/reverse-lookup branch from 4d89656 to 11e54ca Compare August 25, 2025 12:09
@hrw hrw merged commit ea7ffaf into hrw:master Sep 1, 2025
1 check failed
@hrw
Copy link
Owner

hrw commented Sep 1, 2025

Thanks!

Reformatted init to fit in 80 columns. One day will add linter ;D

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