$1 used numerically, but given "pts2". Try using str($1).
I have tried to look into str($1 + 3) with printf("arg+3 is %s\n", str($1 + 3)); with an exit right after. I wasn't able unfortunately to get my argument string as expected, or the argument from the 3rd char on, I would only get arg+3 is.
Interestingly, the BCC counterpart works
When run as
bpftrace ttysnoop.bt pts2
it returnsI have tried to look into
str($1 + 3)
withprintf("arg+3 is %s\n", str($1 + 3));
with an exit right after. I wasn't able unfortunately to get my argument string as expected, or the argument from the 3rd char on, I would only getarg+3 is
. Interestingly, the BCC counterpart works