Comment # 15 on bug 1232536 from Petr Vorel
(In reply to Anthony Iliopoulos from comment #14)
> (In reply to Petr Vorel from comment #12)
...
> > I would hope that /usr/share/bpftrace/tools/bashreadline.bt could be fixed
> > to look into libreadline, but "uretprobe:libreadline:readline" does not work.
> 
> The issue is again that the upstream bashreadline.bt does indeed work when
> bash is statically linked against libreadline. Why do we need to rely on that
> upstream script? Are you using the script examples for bpftrace QA package
> testing?
> 
> Actually "ur:libreadline:readline" does work for me, what error are you
> getting?

Thank you for correcting me. I'm sorry, it's working. I double check for typo,
but it was ok. Not sure what was wrong on my side.

> 
> We could even update the bashreadline.bt to fall back into that, e.g.:
> 
> uretprobe:/bin/bash:readline,
> uretprobe:libreadline:readline /comm=="bash"/
> {
>         time("%H:%M:%S  ");
>         printf("%-6d %s\n", pid, str(retval));
> }
> 
> Would that work for you? I can post a patch.

Yes, this works as well.

Please open PR in https://github.com/bpftrace/bpftrace (IMHO people don't send
patches for bpftrace to https://lore.kernel.org/bpf/) and post a link here (or
mention @pevik and @jirislaby in the PR).


You are receiving this mail because: