[systemd-devel] Systemd Debugging with GDB
elevenyang at linpus.com
Thu Sep 13 22:03:56 PDT 2012
It's my pleasure to receive your reply and get your advice.
Actually I really want to debug source codes from the OS boot(from
systemd first starts) with virtual machines just like debug kernel
sources or in some other ways I don't know .
And I also do some works but failed, so I ask for your help.
Thanks very much!
于 2012年09月13日 20:25, Lennart Poettering 写道:
> On Thu, 13.09.12 13:52, eleven (elevenyang at linpus.com) wrote:
>> Dear All
>> I am so interested in Systemd Design and it is so attractive to me! So I
>> want to join with you.
>> But I have a problem bothered me for a while.
>> Is there any way to debug Systemd's source codes with gdb ?
> You can attach to PID 1 with gdb:
> gdb /usr/lib/systemd/systemd 1
> And that's already it. Also, in many cases it's possible to gdb through
> it in user mode. For that simply run "gdb /usr/lib/systemd/systemd" and
> run this as unprivileged user. Of course, some things don't apply to
> systemd user mode the same way as to system mode, hence this isn't
> always the best option.
More information about the systemd-devel