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]

Accessing size of arrays allocated on the stack


I noticed that systemtap is able to know that a local variable, allocated on
the stack, is an array.  For example, a program containing:

...
int main(int argc, char *argv[])
{
	char buf[40];
	unsigned long p;
	char *str;
...

With a probe containing:
...
probe process("./array_test").function("main").call {
	log (probefunc()." param: ".$$parms)
	log (probefunc()." locals: ".$$locals)
...

Produces
...
main param: argc=0x2 argv=0xbfeb9954
main local: buf=[...] p=0x160c7d7e str=0x3e9a9883
...

Does SystemTap presently support the ability to determine the size of local
arrays using either built-in functionality or embedded C?

Does this differ for user-space vs kernel-space probes?

Cheers,
A


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