moonshine/strace_kcov.patch : can not make Strace after apply the patch.
ZHYfeng opened this issue · comments
make error is below:
strace.c:1755:3: error: duplicate case value
case 'k':
^
strace.c:1682:3: error: previously used here
case 'k':
^
I try to rename the 'k' in 1755 to 'kk' and make it successful.
But when run the strace with -k
it will get the message below:
KCOV ENABLED: 1
../strace/strace: open: Permission denied
Hi,
It seems you had two issues. 1) You cannot build and 2) You cannot execute.
I am not able to reproduce your first issue. When I follow the instructions I provided here: https://github.com/shankarapailoor/moonshine#coverage I am able to properly build. Can you confirm that you followed those instructions?
Regarding the second, are you running strace
on a linux kernel that has built with KCOV? If you are running on a linux instance that has not been compiled with kcov then it will return this error because it cannot open kcov
debugfs file.
Thanks. I have tried and it could work well in a KCOV Linux.
Besides I find that AM_EXTRA_RECURSIVE_TARGETS
in strace/configure.ac is useless.
The make error disapper in a KCOV Linux, too. I forget to tell you.
Hi ZHYfeng,
Yes this strace will return that error if you try to run with -k
on a non KCOV machine. I don't know if it is an issue though :) I am also not sure why you had build issues. Did you apply the patch to the correct commit?
Hi, shankarapailoor,
I apply the patch correctly for many times. I meet this error in a normal Linux but there is not the error in a KCOV Linux. Besides, I look the source code that there is a #ifdef outside the second case 'k'. So it should be that the #ifdef disable in a KCOV Linux?
Ok I see. Good catch; I didn't notice before. I think that the kcov
should have an ifdef as well and a unique option to guard this case.