This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [Fwd: Re: Regarding systemtap support for AArch64]
- From: Mark Wielaard <mjw at redhat dot com>
- To: Petr Machata <pmachata at redhat dot com>
- Cc: William Cohen <wcohen at redhat dot com>, Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>, systemtap at sourceware dot org, Deepak Saxena <dsaxena at linaro dot org>, Krishna Dani <krishna dot mohan at linaro dot org>, Jakub Pavelek <jakub dot pavelek at linaro dot org>
- Date: Mon, 04 Nov 2013 17:05:46 +0100
- Subject: Re: [Fwd: Re: Regarding systemtap support for AArch64]
- Authentication-results: sourceware.org; auth=none
- References: <m24n7snpib dot fsf at redhat dot com>
On Mon, 2013-11-04 at 16:41 +0100, Petr Machata wrote:
> >Mark Wielaard <mjw@redhat.com> writes:
> >
> >> According to the call abi the simple integer value should be in
> >> register "x0". It looks in the generated c code for the module that
> >> it is trying to access the return value with:
> >>
> >> { int64_t value = fetch_register (0); STAP_RETVALUE = value; }
> >
> > Is this using ebl_return_value_location? That should be on the branch,
> > and unless I'm interpreting things wrong, it's doing the right thing:
>
> By which I mean dwfl_module_return_value_location ;)
Yes it should.
The systemtap sources contain a loc2c-test program that is build by
default. You can use it to print out something like the above output if
you want to know how stap translates some variable, argument or return
values at a given address.
For example on my x86_64 setup it will produce something like:
$ ./loc2c-test -K vfs_read "return"
#define PROBEADDR 0xffffffff81181a10ULL
static void print_value(struct pt_regs *regs)
{
intptr_t value;
{
{ int64_t value = fetch_register (0); value = value; }
}
/* max expression stack depth 0 */
printk (" ---> %ld\n", (unsigned long) value);
return;
}