Alastair Robertson
Alastair Robertson
The reason `usage()` prints to standard error is that it's often the only message displayed when invalid command line arguments are used, e.g.: https://github.com/bpftrace/bpftrace/blob/1517d1cc9b7436069412d764ae32d34c9e58afd7/src/main.cpp#L633-L636 We should always print some form...
After looking at what other CLI tools do (e.g. `nm`, `ps`) and searching online [[1]](http://courses.cms.caltech.edu/cs11/material/general/usage.html#:~:text=It's%20important%20to%20always%20print,rather%20than%20to%20a%20terminal.) [[2]](https://unix.stackexchange.com/questions/8813/should-the-usage-message-go-to-stderr-or-stdout), I think we should continue to print usage to `stderr` when there is an...
> Thank you for the detailed feedback. I can return my changes in usage() to stderr. > > For the --help condition, I am thinking to replace the call to...
It would be nice to be able to control this individually for each `print()` call, but I do see the issue with too many arguments. Just throwing out an idea...
And maybe the up-front map declaration syntax could also somehow specify how to print the keys/values: #2954.
Also related: #2952, which describes a way in which maps can be printed in hexadecimal now.
New config options will form part of our stable interface, so I want to be careful about adding new ones to avoid carrying cruft forward forever. Output is meant to...
Agreed - I was just demonstrating that there isn't an urgent need for a fix as what's being asked for is already possible, although difficult to work with. A global...
Good point! The instructions for building bpftrace from source are horribly out of date: https://github.com/bpftrace/bpftrace/blob/master/INSTALL.md#building-bpftrace We should specify the minimum libbpf version requirement (commit dd589c3b31c13164bdc61ed174fbae6fe76c8308 or 1.5.0 when that comes...
> The community seems to be unacceptable to this addition. Is there any reason that can convince the community maintainers? Unlikely imo :( A similar case about getting file paths...