From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27434 invoked by alias); 13 May 2012 07:19:30 -0000 Received: (qmail 27414 invoked by uid 22791); 13 May 2012 07:19:27 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wg0-f43.google.com (HELO mail-wg0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 13 May 2012 07:19:14 +0000 Received: by wgbdr1 with SMTP id dr1so3058591wgb.12 for ; Sun, 13 May 2012 00:19:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.104.65 with SMTP id gc1mr9514675wib.13.1336893552884; Sun, 13 May 2012 00:19:12 -0700 (PDT) Received: by 10.180.104.201 with HTTP; Sun, 13 May 2012 00:19:12 -0700 (PDT) In-Reply-To: <87aa1gqhnq.fsf@fleche.redhat.com> References: <87sjf9qecr.fsf@fleche.redhat.com> <87aa1gqhnq.fsf@fleche.redhat.com> Date: Sun, 13 May 2012 07:19:00 -0000 Message-ID: Subject: Re: [design change] record-replay linux ABI level From: oza Pawandeep To: Tom Tromey Cc: gdb@sourceware.org, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00048.txt.bz2 currently on i386 following is the function: static enum gdb_syscall i386_canonicalize_syscall (int syscall) { enum { i386_syscall_max =3D 499 }; if (syscall <=3D i386_syscall_max) return syscall; else return -1; } which is just straight mapping. If we use generic enum defination, we will end up adding some additional syscalls for ARM and arm_canonicalize_syscall(int syscall) end up having switch {case} and having one-to one mapping for some syscalls and rest syscalls would be shift by 'n' position. which looks clumsy to me. I am trying to see if there is more generic way which would take care of all archor move the defination to arch files. will try to see what best could be done. Regards, Oza. On Thu, May 10, 2012 at 7:09 PM, Tom Tromey wrote: > Oza> The definition of system call record maps fine to x86. =A0but arm > Oza> syscall numbers are different. [partially] for e.g. on x86 sycall > Oza> number for sys_epoll_create =3D 254 while on ARM it is 250. =A0the m= ore > Oza> we go down on defined system calls the more the numbers are > Oza> differing on ARM and we loose one to one trivial mapping. > > My understanding of the current design is that the ARM code would see > the syscall 250, and have a mapping to turn that into > gdb_sys_epoll_create (=3D=3D 254). =A0This can be done bidirectionally wi= th > two lookup tables. > > I suppose this could still not work in some scenarios. =A0One question is > whether these occur in practice or are merely theoretical. > > I don't really care about this API either way. > With a solid justification it is fine to change it. > > Tom