This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/12748] need syscall-number database in tapset


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]