[Bug tapsets/12748] need syscall-number database in tapset
dsmith at redhat dot com
sourceware-bugzilla@sourceware.org
Tue Jun 21 18:41:00 GMT 2016
https://sourceware.org/bugzilla/show_bug.cgi?id=12748
--- Comment #7 from David Smith <dsmith at redhat dot com> ---
Comment on attachment 9345
--> https://sourceware.org/bugzilla/attachment.cgi?id=9345
proposed patch
Right now the script only handles x86_64, ppc64, and s390x. I'd like to see it
handle an arch that has only one ABI (like i686, arm, or aarch64). That will
flush out some issues I'd bet.
I'll bikeshed the following:
====
function syscall_name(num) {
%( CONFIG_COMPAT == "y" %?
if (@__compat_task)
return __syscall_32_num2name[num]
%)
if (%{ BITS_PER_LONG %} == 64)
return __syscall_64_num2name[num]
else
return __syscall_32_num2name[num]
}
====
It would be a bit better as:
====
function syscall_name(num) {
%( CONFIG_COMPAT == "y" %?
if (@__compat_task)
return __syscall_32_num2name[num]
%)
%( CONFIG_64BIT == "y" %?
return __syscall_64_num2name[num]
%:
return __syscall_32_num2name[num]
%)
}
====
The new version converts that 64-bit runtime check to a compile-time check. The
same thing can be done to the syscall_num() function.
How do you see syscall_map() being used? Is it just for use by the testsuite?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Systemtap
mailing list