On Sat, 14.03.15 09:14, Paul Menzel (paulepan...@users.sourceforge.net) wrote:
> Dear systemd folks, > > > using Debian Sid/unstable with systemd 215-12, I attached to it with GDB > to analyze some things. Attached with `gdb --pid 1` worked. > > But continuing the execution and then hitting Ctrl + c to stop and > analyze it again, systemd caught that command and shut the system down. > > How do you accomplish the goal to analyze systemd with GDB? All programs that use signalfd() are really nasty to debug in gdb, since gdb doesn't catch the Ctl-C then anymore via ptrace, but it gets delivered to the signalfd instead, and thus handled by the app anyway. To work around this: keep a second terminal open and send SIGTRAP from there. I usually carefully set break points though so that I never have to deal with PID 1 running uncontrolled in gdb though... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel