public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: oza Pawandeep <oza.pawandeep@gmail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	gdb@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [design change] record-replay linux ABI level
Date: Wed, 16 May 2012 10:48:00 -0000	[thread overview]
Message-ID: <CAK1A=4zR6v1-3Mvk9=FS4nAyMHn=UVpj_YDgL=dkHVJz7s1tXQ@mail.gmail.com> (raw)
In-Reply-To: <87havhtmzy.fsf@fleche.redhat.com>

Tom,

a) yes; The record_linux_system_call is a problem because the
conflicting number would conflict in
{switch} {case} construct of the functions.

b) I am not much familiar with xml generated C files, and where to
change in gdb, but with that, will the record_linux_system_call be
able to incorporate all conflicting syscall numbers in that case ?

c)  there is another way, which is align to current design. (it is not
very very clean but manageable)

define as follows
enum gdb_syscall
{
           /* i386 related syscalls */
           /* ARM related syscalls */
           /* MIPS related syscalls */
           so on..
}

if syscalls share the same number then it is one-to-one mapping.
if at the same number, syscalls are different then add them under ARM
number which would start just after i386.
if there are common syscalls but different number then there would be
shift by a number. then it has to be adjusted in function

static enum gdb_arm_syscall
arm_canonicalize_syscall (int syscall)
{
  enum { arm_sys_prlimit64 = 369 };

  if (syscall <= arm_sys_prlimit64)
    return syscall;
  else
    return -1;
}

Regards,
Oza.


On Tue, May 15, 2012 at 10:11 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Oza" == oza Pawandeep <oza.pawandeep@gmail.com> writes:
>
> Oza> I would have liked to think the same; but the way linux-record.h
> Oza> addresses all the architecture, the enum sycall, is defiend
> Oza> generically.
>
> Oza> what I think is define it in arch files, as syscalls are partially
> Oza> dependent on arch, though they follow posix standard.
>
> Oza> so each arch file would have their own map, compare to current generic
> Oza> map in linux-record.h
>
> If it really makes things better, it is fine by me.
>
> What do you propose to do with record_linux_system_call?
>
>
> How about another approach?  Keep the current mapping idea, but extract
> the mappings from syscalls/*.xml.  That way we help out two features
> with a single data file.
>
> Tom

  reply	other threads:[~2012-05-16 10:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAK1A=4xtgYd8hQEwHxjLQiv4eqhCu0cSRDmmbFJvBDJwDxUM+Q__46748.0269181125$1336555010$gmane$org@mail.gmail.com>
2012-05-09 20:39 ` Tom Tromey
2012-05-10  8:49   ` oza Pawandeep
     [not found]   ` <CAK1A=4xbh0M=yfc2MQpZdDCJEPnL3_z8=TA0VSE7qVCoO0Dn-Q__42617.423789534$1336639800$gmane$org@mail.gmail.com>
2012-05-10 13:39     ` Tom Tromey
2012-05-13  7:19       ` oza Pawandeep
2012-05-13  7:33         ` oza Pawandeep
2012-05-13  9:47           ` oza Pawandeep
2012-05-14 14:57             ` Joel Brobecker
2012-05-15  5:20               ` oza Pawandeep
2012-05-15  5:34                 ` Joel Brobecker
     [not found]               ` <CAK1A=4yervLeVDQ-r49n95ftrB27u8K+R1hfstz1oFwTNX=t7Q__24807.0006179207$1337059251$gmane$org@mail.gmail.com>
2012-05-15 16:42                 ` Tom Tromey
2012-05-16 10:48                   ` oza Pawandeep [this message]
2012-05-16 14:57                     ` Tom Tromey
2012-06-05  9:16                       ` oza Pawandeep
2012-06-06 18:17                         ` Tom Tromey
2012-06-05  9:19                       ` oza Pawandeep
2012-05-09  9:16 oza Pawandeep

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK1A=4zR6v1-3Mvk9=FS4nAyMHn=UVpj_YDgL=dkHVJz7s1tXQ@mail.gmail.com' \
    --to=oza.pawandeep@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gdb@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).