From: Ralf Baechle <ralf@linux-mips.org>
To: Trent Waddington <trent.waddington@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Portable syscall inspection
Date: Tue, 29 May 2007 13:35:57 +0100 [thread overview]
Message-ID: <20070529123557.GA21684@linux-mips.org> (raw)
In-Reply-To: <3d57814d0705281559y56576567r2c23edda5f22c3cf@mail.gmail.com>
On Tue, May 29, 2007 at 08:59:37AM +1000, Trent Waddington wrote:
> Someone finally noticed that my program that uses ptrace only works on
> i386..
> and, by the looks of it, there is no portable way to refer to the
> registers of a
> user_regs_struct when inspecting a system call.
Correct.
> I will probably end up making a header file for each architecture that
> defines where
> in the user_regs_struct things like the syscall number, the return
> value and the first 3 parameters are..
Also consider that some architectures pass parts of the arguments in
registers which on yet others are passed in memory. Sometimes padding
arguments are needed and many more oddities. Similar for results.
Inescapably such a program is a perment maintenance nightmare.
> has anyone done this already? or can otherwise save me a lot of time?
Similar things have been tried before but nothing that would be remotely
sane.
Ralf
next prev parent reply other threads:[~2007-05-31 10:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-28 22:59 Trent Waddington
2007-05-29 12:35 ` Ralf Baechle [this message]
2007-05-31 10:27 ` Trent Waddington
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=20070529123557.GA21684@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trent.waddington@gmail.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
all inboxes | Powered by JetHome®