2 ms·
Ah yes, very good! More such tools are needed that make common strace tasks more convenient. strace is the ultimate debugging tool to dive into almost every p
by nh2 2y ago
Ah yes, very good!
More such tools are needed that make common strace tasks more convenient.
strace is the ultimate debugging tool to dive into almost every problem where a program doesn't do what you want, but its stream based nature and lack of scripting doesn't make all tasks convenient. Most importantly, you can't really "program" with it.
Some time ago, I started implementing "strace as a library" in Haskell, to get an easy-to-process stream of syscalls/signals as an ADT, so that one can easily build features on top of it, e.g. a tree of fork()ed/execve()'d child processes. That's point "special run modes tailored to specific tasks (e.g. execve tree)" from https://github.com/nh2/hatrace https://github.com/nh2/hatrace. I haven't gotten as far as I'd like yet, because I'd like to first explicitly support all Linux syscalls, and build the features on top of that afterwards. And some features are not so easy, e.g. reading memory of the traced process (which strace does to do e.g. show what data was `read()`).
From that experience, I applaud anybody who makes good use of ptrace() -- that man page is not the easiest to read!
- nh2 2y agoAfter playing with the software a bit: The view that diffs environment variables of a process with the ones from the parent process is very nice. Could you add a feature that makes it possible to search/filter the "Environment" panel, maybe even the events panel? Often one wants to figure out how a certain argument, environment variable, or assigned value of each of those finds its way into a process. Being able to filter that quickly would be great!
- kxxt 2y agoYes, it's a very high priority todo for me: https://github.com/kxxt/tracexec/issues/3 https://github.com/kxxt/tracexec/issues/3. I already reserved space for it(The empty line under title in the TUI). It requires some work because for now the environment panel is just a paragraph of text wrapped in a scrollview.
- nh2 2y agoI packaged your program for Nix [1]. If possible, have a look at the build, or even better, become co-maintainer if you can! If anybody wants to try it, on any Linux distro with `nix` installed: NIX_PATH=nixpkgs=https://github.com/nh2/nixpkgs/archive/e5943da391879c12ed8d6477a06805c8de4b27da.tar.gz nix-shell -p tracexec This will drop you into a shell where `tracexec` is installed. [1]: https://github.com/NixOS/nixpkgs/pull/310158 https://github.com/NixOS/nixpkgs/pull/310158