Discussion:
Using lldb in coredumpctl?
(too old to reply)
Ryan Gonzalez
2018-04-12 12:48:43 UTC
Permalink
Raw Message
coredumpd has definitely become one of my favorite systemd components since
it makes debugging segfaults far easier than otherwise. However, for
various reasons, I prefer using LLDB to GDB. Unfortunately, coredumpctl's
gdb command is hardcoded to run, well, GDB.

My idea: what if there were a 'coredumpctl lldb' command, which did the
same thing as 'coredumpctl gdb', except...instead running LLDB.

Of course, this could be done with a new switch, but 'coredumpctl gdb
--lldb' seems a little idiosyncratic...

--
Ryan (ライアン)
Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else
https://refi64.com/
Lennart Poettering
2018-04-12 13:17:49 UTC
Permalink
Raw Message
Post by Ryan Gonzalez
coredumpd has definitely become one of my favorite systemd components since
it makes debugging segfaults far easier than otherwise. However, for various
reasons, I prefer using LLDB to GDB. Unfortunately, coredumpctl's gdb
command is hardcoded to run, well, GDB.
My idea: what if there were a 'coredumpctl lldb' command, which did the same
thing as 'coredumpctl gdb', except...instead running LLDB.
Of course, this could be done with a new switch, but 'coredumpctl gdb
--lldb' seems a little idiosyncratic...
Hmm, three ideas:

1. we could add "coredumpctl run" which will extend the command line
you have with the path to the unpacked coredump: "coredumpctl run
lldb" would then do what you want (at least under the assumption
that lldb is fine with just taking the coredump as argument?)

2. we could add a --debugger= switch or so similar to what you
proposed. Plus a new verb "debug" that is an alias for "gdb", to
make it less idiosyncractic for you.

3. add support for $SYSTEMD_DEBUGGER or so, which would be like #2 but
you could set for your entire login session

Of course any combination of the above would work too.

Please file an RFE issue on github requesting this, maybe linking to
this mail...

Lennart
--
Lennart Poettering, Red Hat
Ryan Gonzalez
2018-04-15 00:14:26 UTC
Permalink
Raw Message
Just filed #8722 for this: https://github.com/systemd/systemd/issues/8722
Post by Ryan Gonzalez
Post by Ryan Gonzalez
coredumpd has definitely become one of my favorite systemd components
since
Post by Ryan Gonzalez
it makes debugging segfaults far easier than otherwise. However, for
various
Post by Ryan Gonzalez
reasons, I prefer using LLDB to GDB. Unfortunately, coredumpctl's gdb
command is hardcoded to run, well, GDB.
My idea: what if there were a 'coredumpctl lldb' command, which did the
same
Post by Ryan Gonzalez
thing as 'coredumpctl gdb', except...instead running LLDB.
Of course, this could be done with a new switch, but 'coredumpctl gdb
--lldb' seems a little idiosyncratic...
1. we could add "coredumpctl run" which will extend the command line
you have with the path to the unpacked coredump: "coredumpctl run
lldb" would then do what you want (at least under the assumption
that lldb is fine with just taking the coredump as argument?)
2. we could add a --debugger= switch or so similar to what you
proposed. Plus a new verb "debug" that is an alias for "gdb", to
make it less idiosyncractic for you.
3. add support for $SYSTEMD_DEBUGGER or so, which would be like #2 but
you could set for your entire login session
Of course any combination of the above would work too.
Please file an RFE issue on github requesting this, maybe linking to
this mail...
Lennart
--
Lennart Poettering, Red Hat
--
Ryan (ラむアン)
Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else
https://refi64.com/
Loading...