#! stap -p4

probe begin {
	print_regs()
	printf("execname is %s\n", execname())
	printf("pid is %d\n",pid())
	printf("tid is %d\n", tid())
	printf("ppid is %d\n", ppid())
	printf("pgrp is %d\n", pgrp())
	printf("sid is %d\n", sid())
	printf("pexecname is %s\n", pexecname())
	printf("gid is %d\n", gid())
	printf("egid is %d\n", egid())
	printf("uid is %d\n", uid())
	printf("euid is %d\n", euid())
	printf("%d\n", is_myproc() 
                       %( systemtap_v <= "1.4" %? + cpuid() %)
                       + cpu())
	printf("pp is %s\n", pp())
	printf("pn is %s\n", pn())
	printf("%d\n", registers_valid() + user_mode() + is_return()
	       + target())
	printf("%s\n", module_name())
	printf("%d\n", stp_pid() + stack_size() + stack_used()
	       + stack_unused())
	printf("addr: 0x%x\n", addr())
	printf("uaddr: 0x%x\n", uaddr())
	log(cmdline_args(1, 1, "bar"))
	log(cmdline_arg(0))
	log(cmdline_str())
	log(env_var("TERM"))
	log(probe_type())
}
