This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: Re: Regarding systemtap support for AArch64]


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;
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]