Add standalone asinfo utility to map syscall names↔numbers and list syscalls #363
+642
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A standalone utility that:
libstrace(avoids UI/runtime dependencies)asinfo_syscalls.hbuilt fromsrc/linux/<arch>/syscallent.h--to-names NR...: Convert syscall numbers to names--to-numbers NAME...: Convert syscall names to numbers--list: List all syscalls (format:NUMBER NAME)Build Integration
src/Makefile.am:asinfotobin_PROGRAMSasinfo_syscalls.hfromsyscallent.hat build timeasinfostandalone (nolibstracedependency)Makefile.am:doc/asinfo.1toman_MANSfor installationDocumentation
doc/asinfo.1: Manual page describing usage, options, and exit codesTesting
Four new test cases in
tests/:asinfo.test: Basic roundtrip test (name → number → name)asinfo-multi.test: Multiple argument handlingasinfo-errors.test: Error case validation (unknown names/numbers)asinfo-list.test: Verification that--listincludes expected syscallsAll tests pass successfully.
Packaging
debian/strace.install: Installsbuild/src/asinfoto/usr/bindebian/strace.manpages: Installsbuild/doc/asinfo.1to man pagesUsage Examples
Technical Details
Syscall Table Generation
The
asinfo_syscalls.hheader is auto-generated at build time by parsingsrc/linux/<arch>/syscallent.h: