From 154c833f51e9aa13cea8c28b80d0a443d5b735f1 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Thu, 13 Feb 2025 04:27:12 +0200 Subject: [PATCH] gdb, coredumpctl: add prompt skip examples (#15727) * Update gdb.md * Update coredumpctl.md * Update gdb.md * Update coredumpctl.md * Update pages/linux/coredumpctl.md Co-authored-by: Machiavelli <145562237+MachiavelliII@users.noreply.github.com> --------- Co-authored-by: Machiavelli <145562237+MachiavelliII@users.noreply.github.com> --- pages/common/gdb.md | 4 ++++ pages/linux/coredumpctl.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/pages/common/gdb.md b/pages/common/gdb.md index 903877f6fa..13ca488f96 100644 --- a/pages/common/gdb.md +++ b/pages/common/gdb.md @@ -22,3 +22,7 @@ - Start `gdb` and pass arguments to the executable: `gdb --args {{executable}} {{argument1}} {{argument2}}` + +- Skip debuginfod and pagination prompts and then print the backtrace: + +`gdb -c {{core}} {{executable}} -iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt` diff --git a/pages/linux/coredumpctl.md b/pages/linux/coredumpctl.md index 38313e371a..313b9e6d88 100644 --- a/pages/linux/coredumpctl.md +++ b/pages/linux/coredumpctl.md @@ -26,3 +26,7 @@ - Extract the last core dump of a program to a file: `coredumpctl --output={{path/to/file}} dump {{program}}` + +- Skip debuginfod and pagination prompts and then print the backtrace when using `gdb`: + +`coredumpctl debug --debugger-arguments="-iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt"`