coredumpctl: Add --debugger-args= option

This commit adds the possibility to pass command line options to the
debugger invoked with coredumpctl debug.

Resolves: #9905
This commit is contained in:
Michal Fabik
2020-12-16 12:42:53 +09:00
committed by Yu Watanabe
parent a7c52e1ee1
commit a2be8be2cf
3 changed files with 77 additions and 38 deletions
+17 -1
View File
@@ -137,7 +137,8 @@
<citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
will be used. This may be changed using the <option>--debugger=</option>
option or the <varname>$SYSTEMD_DEBUGGER</varname> environment
variable.</para></listitem>
variable. Use the <option>--debugger-arguments=</option> option to pass extra
command line arguments to the debugger.</para></listitem>
</varlistentry>
</variablelist>
@@ -217,6 +218,15 @@
will be used. </para></listitem>
</varlistentry>
<varlistentry>
<term><option>-A</option> <replaceable>ARGS</replaceable></term>
<term><option>--debugger-arguments=</option><replaceable>ARGS</replaceable></term>
<listitem><para>Pass the given <replaceable>ARGS</replaceable> as extra command line arguments
to the debugger. Quote as appropriate when <replaceable>ARGS</replaceable> contain whitespace.
(See Examples.)</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--file=<replaceable>GLOB</replaceable></option></term>
@@ -323,6 +333,12 @@
<programlisting># coredumpctl debug</programlisting>
</example>
<example>
<title>Use gdb to display full register info from the last core dump</title>
<programlisting># coredumpctl debug --debugger-arguments="-batch -ex 'info all-registers'"</programlisting>
</example>
<example>
<title>Show information about a process that dumped core,
matching by its PID 6654</title>