This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Function arguments question on ARM (RaspPi)
- From: Thomas Winkler <tom dot winkler at gmail dot com>
- To: systemtap at sourceware dot org
- Date: Mon, 21 Dec 2015 15:59:23 +0100
- Subject: Function arguments question on ARM (RaspPi)
- Authentication-results: sourceware.org; auth=none
Hello List,
I'm currently experimenting with SystemTap on Raspberry Pi 2 ARM board
running Raspbian.
The function I want to tap into is part of a module and has the
following signature:
static int mydrv_i2c_read(struct i2c_client *client, uint8_t reg,
uint8_t *buf, uint8_t count);
My SystemTap script looks as follows:
probe module("mydrv").function("mydrv_i2c_read")
{
printf("%s\n", $$parms)
printf("u_arg_1: 0x%x\n", pointer_arg(1))
printf("u_arg_2: 0x%x\n", uint_arg(2))
printf("u_arg_3: 0x%x\n", pointer_arg(3))
printf("u_arg_4: 0x%x\n", uint_arg(4))
}
The output I get is as follows:
client=0x80576a00 reg=0x80 buf=0x9553be68 count=0x57
u_arg_1: 0xb5e1f800
u_arg_2: 0x24
u_arg_3: 0x9553bea7
u_arg_4: 0x1
client=0x8006d0cc reg=0x80 buf=0x9553be68 count=0x57
u_arg_1: 0xb5e1f800
u_arg_2: 0x30
u_arg_3: 0x9553bea5
u_arg_4: 0x3
I would have expected that the values I get when printing out $$parms
are identical to those when using the _arg() functions. I know that
the values I get via the _arg() functions are the correct ones but I
don't understand why $$parms is wrong. Even more interesting, the
content displayed via $$parms does not change while the ones for
_arg() do (as I had expected). I also tried accessing the arguments
via, e.g., $client, $reg, $buf and $count but I get the same results
as with $$parms.
I guess I'm overlooking something here. Could you shed some light on this?
Thank you,
Thomas
--
Thomas Winkler
tom.winkler@gmail.com