Fedora provides debug symbol as debuginfo package. This article will describe installing debuginfo and debugging package.
Table of Contents
1 Install debuginfo package
Install debuginfo package with dnf debuginfo-install. This package name does not have suffix.
$ sudo dnf debuginfo-install -y <pkg>
2 Debug command
Set command to GDB.
$ gdb <prog>
In case of ls command is as below.
$ sudo dnf debuginfo-install -y coreutils $ gdb ls
3 Debug running process
Set PID to GDB. The pidof command can be used for only one process.
$ sudo gdb -p $(pidof <prog>)
In case of xrdp process is as below.
$ sudo dnf debuginfo-install -y xrdp $ sudo gdb -p $(pidof xrdp)