Description of problem: cmdline_arg output need to be fixed. Version-Release number of selected component (if applicable): systemtap-2.2.1-1.fc18.i686 How reproducible: Always Steps to Reproduce: 1.Run following stap script. probe kprobe.function("sys_unlinkat") { asmlinkage() printf("cmdline_arg(0)= %s\n", cmdline_arg(0)) printf("cmdline_arg(1)= %s\n", cmdline_arg(1)) printf("cmdline_arg(2)= %s\n", cmdline_arg(2)) printf("cmdline_str= %s\n", cmdline_str()) } 2. Remove a file Actual results: cmdline_arg(0)= rm""fabc123 cmdline_arg(1)= -f""bc123 cmdline_arg(2)= abc123 cmdline_str= rm -f abc123 Expected results: cmdline_arg(0)= rm -f abc123 cmdline_arg(1)= -f cmdline_arg(2)= abc123 cmdline_str= rm -f abc123 Additional info: Also the latest version 2.4/0.155, commit release-2.3-70-g1ab99b2 have the same issue. I put an output of cmdline_str as a good example. cmdline_arg(0) and cmdline_str should be the same result.
Fixed in upstream git commit c71a7f200c. (Note that cmdline_arg(0) is not the same as cmdline_str; the comments were misleading.)
To make sure this stays fixed, I added a new testcase in upstream git commit 5c79255fdd called 'systemtap.base/cmdline.exp'