SystemTap or ebpf might be the way to go for visibility at that level. Not quite a debugger, but they can be very helpful.
Re:Writing a Linux Debugger (2017)
by PhilipRoman on Thursday June 15, 2023 @01:34AM
(#36336790)
I had heard of SystemTap, but had no idea it was that powerful. In particular, the user space marker feature sounds like what I need. Although it sounds like it may require manual instrumentation.
Re:Writing a Linux Debugger (2017)
by schemescape on Thursday June 15, 2023 @12:15AM
(#36336316)
Not sure about Linux specifically, but it sounds like you’re looking for a kernel debugger that can communicate with a user mode debugger (or debuggers).
Edit: actually SystemTap mentioned in a sibling comment sounds simpler if you just need instrumentation.
I must admit, the title got me very excited (it's still a cool article regardless) - something I've always wanted is a system-wide debugger for Linux. Something that can put breakpoints in arbitrary executables or shell scripts (via custom /bin/sh wrapper?) system wide, not just within a debugging session. I'd love to be able to put conditional breakpoints on, say, any process that opens a named pipe matching some regex. I find that when dealing with complex systems involving systemd services, cron jobs, udev and 30 different daemons running in background, gdb and strace simply aren't enough.