* syscall.c (known_scno): Do not check for native_scno field on
platforms that support only one personality.
---
native_scno was implemented for platforms with multiple personalities.
On platforms that support only one personality,
tcp->scno + NR_SYSCALL_BASE is already native.

native_scno is currently initialized in 4 syscallent.h files, but only
linux/i386/syscallent.h really have to use it, and other 3 of them
(linux/bfin/syscallent.h, linux/m68k/syscallent.h and
linux/microblaze/syscallent.h) don't really have to bother.
I suppose it's a result of cut-n-paste.

 syscall.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/syscall.c b/syscall.c
index dc82b2a..79d3b4a 100644
--- a/syscall.c
+++ b/syscall.c
@@ -1326,13 +1326,14 @@ get_scno(struct tcb *tcp)
 
 
 long
-known_scno(tcp)
-struct tcb *tcp;
+known_scno(struct tcb *tcp)
 {
        long scno = tcp->scno;
+#if SUPPORTED_PERSONALITIES > 1
        if (scno >= 0 && scno < nsyscalls && sysent[scno].native_scno != 0)
                scno = sysent[scno].native_scno;
        else
+#endif
                scno += NR_SYSCALL_BASE;
        return scno;
 }


-- 
ldv

Attachment: pgp6HpDkk2jOI.pgp
Description: PGP signature

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to